Upgrading a C50 configuration to a SCD5200 configuration in System Configurator

NOTE:  This method is not supported by Foxboro, and has not been extensively tested.  Proceed with caution!

 How System Configurator stores data

System Confiogurator uses the PostgreSQL database as its data store.  In particular, the SYSCFG database stores data related to the current rtu configuration, and the ROOTDB database stores data such as rtu types, IO modules, menu options etc.

There are a number of tables (which are in turn split into subtables) that contain items in the configurations.  The main tables of interest are:

  • unit_rtu – Contains all the RTUs
  • card – Contains all the IO cards, CPU cards, comms cards
  • card_file – Contains all the RTU IO files, such as 5 slot or 10 slot.  Usually has the same number of entries as unit_rtu
  • comms_port – Contains all the comm ports
  • calc_task_rtu_idf – Contains all the IDF calcs
  • calc_task_rtu_sall – Contains all the SALL calcs
  • point_unit – Contains all the points that are available to consume for a slave device

There are many other tables as well, but we usually do not have to deal with these.  By manipulating the data in these tables we can perform tasks quite easily that System Configurator does not normally allow us to do.

Every single item in the configuration has an object id (oid), which are all unique (it’s actually a timestamp when the object was created).   In each table, an object will reference its parent object by its oid, for example a comms port will belong to a card which will belong to a file, which belongs to an RTU.  By changing the oids of the parent objects we can easily move RTUs/cards/ports/files around which we cannot always easily do in System Configurator.

RTU50 to SCD5200 Upgrade Procedure

  1. Create a new SCD5200 and IO file alongside your existing RTU50 in System Configurator.
  2. Close System Configurator (you should not have System Configurator and psql open at the same time)
  3. Open a new BASH shell by starting C:\program files\foxboro\cygwin\cygwin.bat
  4. Open sql interactive terminal by typing “psql SYSCFG” at the command line.
  5. Set the screen width buffer size of the command prompt to 1000 (click on the title bar icon, then properties, layout buffer size width)  This makes it easier to see the data from the database.
  6. Move all the cards in the C50 IO file to the SCD5200 IO file:
    1. View all the IO files in the system by typing “select * from card_file;”
    2. View all the cards in the system by typing “select * from card;”
    3. Now move all the cards from the C50 to the SCD by typing the following
      “update card set file_oid=xxxx where oid=yyyy;” where xxxx if the oid of the SCD card file (shown in the command window) and yyyy is the oid of the card you want to move.  Do this for each card that needs moving (don’t move CPUs, just cards in IO slots).  You could use the “oid=yyy or oid=zzz” syntax to move many cards at once.
    4. Update the card types as necessary.  32ADIs, 20AI and TDO cards in particular must be upgraded.  This can be done by typing:
      “update card set card_type_oid=xxx where slot_number=y;” where xxx is the new card type (see the reference table in Appendix 1), and y is the slot_number of the card you are changing the type of.

     

  1. Move any calculations used to the SCD RTU.
    1. Type “select * from unit_rtu;” to list the RTUs
    2. For IDF calcs, type “update calc_task_rtu_idf set unit_oid=xxx;” where xxx is the SCD RTU oid.
    3. For SALL calcs type “update calc_task_rtu_sall set unit_oid=xxx;” where xxx is the SCD RTU oid.

 

  1. Move comms port attached to a P2E or P3E CPU.  As the CPU card is not being moved, the second comms port from the C50 CPU card must be moved to the SCD5200 CPU card (if it is being used.  If not, skip this step).
    1. To list the comms_ports type “select * from comms_port;”
    2. To list the cards type “select * from card;”
    3. Find the comms port that you need to move in the list, and move it to the appropriate CPU card by typing “update comms_port set card_oid=xxx where oid=yyy;”, where xxx is the oid of the SCD CPU card, and yyy is the oid of the second port of the C50 CPU card

 

  1. Move all points to the new RTU.
    1. This is a tricky step, so pay attention.
    2. Exit PSQL by typing “\q”
    3. Type “pg_dumpall > syscfgdump.txt” (this might take a minute)
    4. Open the syscfgdump.txt file (located in you user folder)
    5. Search for the text “COPY point_unit”
    6. Now, you need to find the first point in this list that is not an internal RTU point.  This seems to be about the 22nd point in the list for me (may differ).  To find out what each point is copy the third number from the right in the row (should be an 18 digit number) and search up for this number.  When you find the number, and it is at the start of a line, scroll right to see what this number represents (you should find the descriptive text on this line).  If it is an internal point such as HeapMemory, FlashIdent, NVRam etc scroll down the first list until you find the first non internal point, and take note of the oid of this point.  Note:  If your configuration used those internal points, you will need to remap those points!
    7. Now jump back into psql (“psql SYSCFG”)
    8. Set all of those dnp points to the new RTU by typing
      “update point_unit set unit_oid=xxx where point_oid>=yyy;” where xxx is the SCD RTU oid (shown above in the terminal) and yyy is the first non internal point you found in the previous step.

 

  1. If you have typed carefully, you should have a new SCD5200 RTU!  Remember to update the SALL source if necessary.

 

| February 27th, 2012 | Posted in Foxboro, SCADA |

4 Responses to “Upgrading a C50 configuration to a SCD5200 configuration in System Configurator”

  1. CAA MARCINIAK FONSECA Says:

    Hello friend, are you able to provide me a link where I could download the RTU C5 System Configurator? Thank you.

  2. Raggles Says:

    Sorry, you need to contact your distributor or Schneider GCS

  3. CAA MARCINIAK FONSECA Says:

    Thank you, I contacted but this configurator is out of date. I have a C50 and a configurator intaled but it's don't work properly. I'm trying to use your fixes to corret it but withou sucess. The original configurator is inside the zip file in that fix?

  4. Raggles Says:

    Which configurator is out of date? Only Schneider or their distributors can give you the latest version. If you have problems with your installation you need to talk to GCS - all of the scripts here were for older versions that didn't work on windows 7 and no longer apply. This post is for upgrading a C50 RTU to a SCD5200, and may or may not work on the latest version.

Leave a Reply