Applies To:
  • CitectSCADA 3.00

Summary:
Question: I'm upgrading to version 3.00 of Citect for Windows but I modified my citect.frm file - what special steps do I need to take? 

Solution:
If you fall into one of these three categories then follow the steps below. (If unsure then follow the more complicated steps that follow).
  • Upgrading from version 1.xx to version 3.xx
  • Upgrading from version 2.xx BUT did not modify any page based animation dbf field definitions (as listed below)
    "Numbers" pgnum
    "Text" pgtext
    "Symbols" pgsym
    "Colours" pgcol
    "Bar Graphs" pgbar
    "Trends" pgtrend
    "Page Keyboard" pgkey
    "Buttons" pgbutton
    "String" pgstr
    "Advanced Animation" pgadv
  • Did modify one of the above but did NOT use any objects of the modifed type(s) inside a template or library object of the project to be upgraded. For example if you modified 'pgbuttons' but none of your templates/library objects have any buttons on them.
  1. Make a backup of any projects. The upgrading process will modify a project. Restoring from a backup copy is sometimes the only means of recovery should the upgrade fail.
  2. Make a backup copy of your modified CITECT.FRM ('form' file).
  3. Rename your modified 'form' file to MODIFIED.FRM
  4. Install Citect for Windows version 3. (Do NOT run the Graphics Builder or Project Editor yet)
  5. Manually merge the changes in MODIFIED.FRM with the changes that we have made in CITECT.FRM
  6. Run the Project Editor - this will update the field structure of each of the dbf files in your project.
  7. Run the Graphics Builder - this will upgrade all of your graphics pages, template and libraries.

If you have modified the page based animation dbf field definitions AND they are used in any templates or library objects then you will need to follow the steps below.

  1. Make a backup of any projects. The upgrading process will modify a project. Restoring from a backup copy is sometimes the only means of recovery should the upgrade fail.
  2. Make a backup copy of your modified CITECT.FRM ('form' file).
  3. Rename your modified 'form' file to VERSION2.FRM
  4. Install Citect for Windows version 3. (Do NOT run the Graphics Builder or Project Editor yet)
  5. Rename the newly installed CITECT.FRM to VERSION3.FRM and copy your old VERSION2.FRM back to CITECT.FRM. This shuffling around of form files is necessary as the templates and libraries must be upgraded with your old (modifed) form file before the database files are upgraded.
  6. Copy the following new definitions from the version 3 form file (VERSION3.FRM).
    "Animated Symbols" pgansym
    "Size and Move" pgsizmve
    "Sliders" pgslider
    "Events" events
    "Accumulators" accums
  7. Set the following parameter in CITECT.INI

[Convert]
HardCodedVersion2FormFile = 0

This will make the conversion use the modified form file 'CITECT.FRM' instead of the default version 2 form file definitions.

  1. Run the Project Editor - pgansym, pgsizmve, pgslider, events and accums databases will be created in the projects. When the Graphics Builder runs it will expect to find these new databases and will give warning messages if it cannot find them.
  2. Run the Graphics Builder - this will upgrade all of your templates, libraries and pages. Warnings about field size mismatch at this stage should be taken very seriuosly.
  3. Shutdown both the Graphics Builder and Project Editor.
  4. You will now need to manually merge the changes that you have made prior to installing Citect for Windows version 3 with changes we have made. The resulting form file should have all changes you have made, all the changes we have made and all new forms we have added.
  5. Set [CTEdit]Upgrade=1 in the CITECT.INI file.
  6. Run the Project Editor - this will update the field structure of each of the dbf files in your project.

Why is all of this necessary ?
In version 2 the record fields of any objects using page based animation were stored as a binary image in the template/library files. The offsets of fields were NOT stored with the binary image, instead the 'form' file was used to caclulate the offsets. Say an object is stored in a template or library. Now the form file is modified changing the field sizes of the objects record. The offsets calculated from the form file will not match up to the binary image stored in the template or library. So to read the record of the object the same form file must be used as when the object was created initially.

In version 3 the record is stored as a list of fields and values. To upgrade the file to version 3 format the original form file must used (as explained above). But - you might say - the form file has already been modified for version 3. A hard coded version 2 definition is used to read the records unless disabled by an ini variable.

What if I've already run the Project Editor ?
So you've already run the project editor and had your database field sizes upgraded to version 3. What you will have to do is run steps 5 to 8. Between steps 8 and 9 restore the backup of your project. Then continue on with the rest of the steps.

 

Keywords:
 

Attachments