Running Foxboro's System Configurator on Windows 7

The latest edition of System Configurator is fine on Windows 7/8/10 so this information is now redundant.

This post is related to Foxboro's System Configurator program for configuring SCD5200 and RTU50/C50 RTUs. Now, SysCfg only runs on windows XP at the moment (Jan 2012), which is a PITA because everyone in the real world now uses Windows 7. So I have endevoured to do Foxboro's job for them, and make SysCfg work on W7.  Note: I have removed the upgrade files and scripts as they are not required with the latest versions of RTU Station, I'll leave the rest of the post for history.

How System Configurator Works

SysCfg is made up of a number of different components. The GUI is made of a java program (obvious from the non standard windows look and feel, but more obvious when you look at the program files). However the java program is little more than a GUI, because a large portion of the work is done by this thing called Cygwin.

What is cygwin?

Cygwin is like having a copy of linux on windows. Its basically a unix like environment that you can install, and then you can open up a bash shell and use a whole bunch of typicall GNU/linux utilities.

SysCfg uses cygwin extensively because all the data stored in you configurations etc is stored in a PostgreSql database, which for some reason they have chosen to access via cygwin rather than use the native windows version of postgresql. My guesses for this design choice is that either:

a) There is also a linux version of SysCfg and they are trying to keep the same code base.
b) The original/current dev is a linux dev, and this is the best they could come up with for windows
c) Some other extremely weird reason

But whatever the reason that is how they've done it, so that's what we've got to deal with.

So what's the problem with W7?

The short answer is I don't know 100%. I suspect the problem lies in that there are some fundamental ways in which memory is managed in windows 7, along with many of the system dlls being changed has probably upset the apple cart a wee bit with the very old version of cygwin that syscfg comes with by default. The postmaster service just simply does not work on windows 7, crashing with an error about not being able to allocate memory on the heap (or something similar, I forget). It was suggested by some people that the problem could be fixed by rebasing all the *.dlls in the cygwin distribution, but the problem was that I could not get a binary copy of the rebase program for that version of cygwin, nor could I compile it because I didn't have the compilers installed.

So what then?

The solution I came up with was to simply replace the entire cygwin distribution with the latest version and use that. This gives us a newer version of postgresql and all the other tools (usually a good thing), but unfortunately changed a couple of things as well. This meant that we have to have another service running on the target machine (Cygwin Server), and have to make a few minor changes to the registry and one of the SysCfg maintenance scripts.

And thats it?

Well not quite. Because the of the newer postgresql version, SysCfg backup files are no longer backwards compatible with the older version. SysCfg backup files are simply a zip file with a SQL script in them which contains all the data. The problem was that there are some minor changes to the script that didnt quite work with the older version, but fortunately these changes are minor enough to be able to automatically correct.

The short version is, the W7 SysCfg can restore new and old backup types, but the XP SysCfg can not restore W7 backups.

So, I made the SysCfgBackupDeversioner tool, which makes a few changes to the backup file so that it works with the XP SysCfg. Its operation is failry simple, all it does is add 'WITHOUT OIDS' the the end of every CREATE TABLE statement, and makes a few modifications to the initial db setup stuff at the start of the file (Basically removes the new stuff and replaces it with the old stuff).

And, because where I work we store all the backups on the network, I created another tool which backs up and restores across the network (which doesn't work with the regular program).  It can also deversion the backup file as part of the same process, so if you use this you will notice almost no difference from your normal configuring experience.

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

9 Responses to “Running Foxboro's System Configurator on Windows 7”

  1. jo Says:

    Your link is broken

  2. Raggles Says:

    Should be fixed now

  3. Cor Says:

    Can we get the broken link fixed, we would like to have the files.
    We tried the link but it tells us that it is not available.
    Thank you.

  4. Raggles Says:

    link fixed, but you would be better off using the latest official version that supports windows 7 up. I wouldn't recommend using my update with the later official releases either.

  5. Cor Says:

    Who is offering the latest release? is this Foxboro?

  6. Raggles Says:

    yep, foxboro/invensys/schneider. I think you can get it from the schneider global support site

  7. Cor Says:

    thank you sir, we will follow up with them.

  8. fuank Says:

    i found the link is broken,!eVFliZDZ!e7Tg6nNVHnutzlMlmck3JO15nqWAuo816f_xqaHj-14

    can you give me the new link ?
    i've contact invensys support to fix my problem but until today they cannot give me the correct answer. so i still using my old xp machine until today

    appreciate your help


  9. Raggles Says:

    That link is correct, but there is no need to use this on XP machines, it was intended to make earlier versions of System Configurator work correctly on Windows 7. These issues have now been resolved by Invensys/Schneider in newer releases, which you can obtain from your local Schneider distributor.

Leave a Reply