DDE Server for SQLTags

I’m working on a DDE server for FactoryPMI. I thought I would post the beta version of the DDE Server in case anyone else has interest in communicating with FPMI with DDE and wanted to try it out.

Why?
Well you can create links in Excel to SQLTags, thereby getting ‘live’ data. You can POKE (write) a value from Excel to FPMI. You can read/write SQLTag values from any application that supports DDE. But the real reason I’m working on the DDE server is to allow an alarm dialer program, such as SCADAlarm or WIN-911 to communicate with FPMI. Currently we send alarms to the operators via cell phone text messages. This works but the problem is that an operator has to log into FPMI in order to acknowledge the alarm. By having an alarm dialer program send voice alarms, the operator will be able to acknowledge the alarm over the telephone without having to log into the system.

What does it do?
When the Server is started it creates a DDE Program Name – fpmidde. Once you create a Topic the Server will start listening for DDE communications on that Topic. When a REQUEST (read) communication is received the Server will communicate with the FPMI database for the value of the Item and return that value. If the Item is not a valid SQLTag the value ERROR will be returned. When a POKE (write) communication is received the Server will write the Value of the Item to the FPMI database. When an ADVISE communication is received the Server will add that Item to it’s group of items to advise. The Server polls the FPMI database every second looking for changes, when the Server finds a change it sends the new value to those applications which had subscribed to that Item.

How do I use it?
Start the Server, enter a Topic name, select a database, enter the connection string and click Add Topic. Open Excel and type =fpmidde|yourtopic!’yoursqltagname’. When entering the SQLTag name you need to include all the Folder names as well. So if you want a tag named Plant1Flow and that tag is located in a Folder named Flow you would use the Item name ‘Flow/Plant1Flow’. When using Excel it is best to place single quotes around the tag.

What’s next?
A view which shows active Topics.
A view which shows subscribed Items.
More error checking. (At this time values are not check before trying to perform a write to the FPMI database, this means if you try to write a value of 3 to a DateTime SQLTag, the Server will try to write this value)
Add support for Item.Alarm – The .Alarm value is read from the FPMI alarm_log table instead of the SQLTag table.
Add support for System.Alarm – This value will indicate if there is any active alarm in the alarm_log table.
Add support for Item.Ack – The .Ack value is read from the FPMI alarm_log table it is used to read/write the acknowledgement status of an SQLTag.
Add support for System.Ack – This value is read from the FPMI alarm_log table it is used to read/write the acknowledgement status of all SQLTags.

Things to keep in mine -

  1. This is a BETA version and does not currently have all required error checking. So if you don’t do everything exactly right it’s not going to work.
  2. The Server has the driver for SQL Server but I have not tested it yet, so it might/might not work. I have been using the Server with a MySQL database, this does work.
  3. This application was not developed by Inductive Automation, so they won’t be offering support on it.
  4. By downloading and running this application you are accepting all risk and liability.
    FpmiDdeServer.zip (677 KB)
    If you do try this application and have problems, see spots for improvements please let me know.

Has anyone used this? Does it work with Ignition?
Thanks

I haven’t tried it, but it should work perfectly well with Ignition- as long has you have Ignition set up to use “External SQLTags” (using, for example, the Database Driving Provider).

Regards,

Cool work Pat.

Think this could be made into an Ignition module some day?