Applies To:
  • CitectSCADA 3.x 4.x 5.x

Summary:
NetDDE sharenames are necessary to reference resources available on a server machine. Traditionally, each resource has an application name, topic name and item(optional) name specified. The 2 major disadvantages of this syntax is that it's difficult to create topics dynamically at runtime, and you could need dozens of shares to communicate with a single application. A better and lesser known syntax exists which allows you to connect to any number of supported topics.  

Solution:
Rather than specifying a sharename with the usual $ suffix use |* instead. Define the Application Name as usual. Instead of defining a particular Topic Name, use a * to define a wildcard. The Item Name may be left blank. Note that although the NT DDEShare Manager appears to support * in the Topic name, we have been unsuccessful in using this syntax on the NT platform.

For example:

Some Common Applications
Application DDE Application NameSample DDE Topics
Microsoft Access MSAccess Name of an open database, System
Microsoft Excel Excel Name of an open workbook, System
Microsoft Word Winword Name of an open document, System
Citect Citect Name of an open database, eg "variable", "system" or "data"
Share Syntax with NetDDE
Syntax Share Name Application Name Topic Name
Traditional Arbitrary, eg Excel_bk1$ Excel Data.xls
Improved Excel|* Excel *
Traditional Arbitrary, eg Citect$ Citect Variable
Improved Citect|* Citect *
Calling Application and Topic Pairs for Excel with NetDDE
Syntax Application Name Topic Name
Traditional \\ServerName\NDDE$ Arbitrary share name, eg Excel_bk1$
Improved \\ServerName\Excel Any supported topic, eg [Data2.xls]sheet5

For example, in an Excel cell you would traditionally type: ='\\ServerName\NDDE$'|'Excel_bk1$'!'R1C1'.
Now you would type: ='\\Servername\Excel'|'[Data.xls]sheet5'!'R1C1'

Calling Application and Topic Pairs for Citect with NetDDE

In an Excel cell you could traditionally type: ='\\ServerName\NDDE$'|'Citect$'!'my_var_tag'
Now you would type: ='\\Servername\Citect'|'variable'!'my_var_tag'

NOTE: Substitute "Variable" with "Data" for Citect V3.00 and older.

 

Keywords:
 

Attachments