Using CitectSCADA > Exchanging Data with Other Applications > Using DDE (Dynamic Data Exchange) > Posting select data using DDE

Posting select data using DDE

You might have a tag naming convention which is not DDE compatible, or inappropriate for use in a DDE call. CitectSCADA provides the ability to publish specific tags under different names in DDE. This involves using the DDEpost function.

To make selected CitectSCADA variable values or the results of calculations available to external DDE Client applications currently running on the same computer, use the Cicode DDEPost() function to have CitectSCADA runtime behave as a DDE server.

This conversation is one-way, which allows an external DDE Client application (like Excel, Word, etc.) to read the value from CitectSCADA using DDE. The Client application cannot change this value in CitectSCADA.

You can use this function to present data under a different name than its source. For instance, the following example presents the value of variable tag PV1 as "Process1".

The following Cicode example posts the value of variable PV1 using DDE:

DDEPost("Process1", PV1) 

Once posted, this value can be accessed, for example, from a cell in Excel containing the following formula:


or from a field in Microsoft Word containing the following function:

{DDEAuto Citect Data Process1 }


This method of DDE connection requires that both CitectSCADA runtime and the DDE Client application (for example Excel or Word) are running on the same computer at the same time. Once the DDE connection has been made, the DDE Client would normally display the updated value of the CitectSCADA DDE posting as soon as it becomes available, usually within milliseconds of the post.

Unfortunately, this posting method of DDE linking is subject to breakage whenever CitectSCADA runtime is closed, even if CitectSCADA runtime is subsequently restarted. The DDE Client application might not detect the lack of connection, as updates to the data in the DDE Client (for example Excel) only occur after each post by the DDE server (CitectSCADA runtime). If no further posts occur, and in this scenario none will (as the DDE link is disconnected), the DDE Client application receives no update, and subsequently might display data which could be out of date. This disconnected state will remain until the DDE link in the DDE Client application is refreshed or the DDE Client application is restarted.

See Also