Applies To:
  • CitectSCADA 3.xx, 4.xx, 5.xx

Summary:
How do I configure Citect to talk to a remote DDE Server using Citects DDEDrv protocol? I want Citect to be a DDE Client to an Excel spreadsheet which will be my DDE Server application. However the DDE Server and Client are going to reside on different PCs. 

Solution:
You will need to establish a network DDE (NetDDE) connection between the client and server applications. There are numerous KB articles about this, but in summary ensure:
  1. Netdde.exe is running on both PCs;
    NT: will be running by default on NT.
    Win95: Suggest adding it to Startup folder. It resides in the Windows directory.
  2. You can browse the Server PC from the Citect PC;
    Eg from the START | RUN menu type \\<Server_pc_name>\C Where C drive has been shared on the remote.
    The <Server_pc_name> can be found via the Control Panel | Networks | Identification Tab on the remote.
  3. You have established a share on the DDE Server (Excel) PC;
    NT: has a built in share manager. Type "DDE Share" from the START | HELP menu to get a hotlink to it.
    Win95: You will need to install DDESHR.EXE or another share manager application to create and manage your shares.
    (see our FTP site for a copy)

For this example the share details are as follows: (Refer to KB Q1927 for an explanation of Wildcard sharename syntax)

Share Name: My_Excel|* <the share name is completely arbitrary, but |* is essential>
Application Name: Excel <must be the registered name of the DDEServer application>
Topic Name: * <as per Wildcard convention>
Item Name: <can leave blank>
Level 1 Access Authority: (note you MUST have the following checked in order for communications to work correctly)
Request <checked>
Advise <checked>
Poke <checked>

  1. Citect Configuration:
Boards form
Board name: Board1
Board type leave this field blank
Address: 0
Ports form
Port name: Port1_Board1
Port number: 1
Board name: Board1
I/O Devices form
Name: Net_DDE_Dev
Number: 1
Address: \\<Server_pc_name\My_Excel|Citect.xls
<This follows the Application|Topic convention where the Application is the remote PC and share name and the Topic is an existing spreadsheet you are connecting to.>
Protocol DDEDRV
Port name: Port1_Board1
Variable Tags form
Name: Tag_1
Data Type: INT
I/O Device Name Net_DDE_Dev
Address: R1C1

Place the tag on a page, configure a hardware alarm page, compile and run the project.

  1. Go to the page and confirm that communications have been established. If not, check for hardware alarms, and recheck each step above.

Notes and Tips:

A useful DDE Conversation checking tool is DDESpy which is shipped with Visual Basic I believe.

If establishing numerous conversations to a number of spreadsheets, configure a new Citect I/O Device for each, but only configure a single Port and Board.

Refer to online help for fine tuning the DDEDrv communications. eg tweaking the Watchtime, Timeout, Delay, Max Pending parameters.

Citect must be able to establish an Advise loop with the server application as well as being able to make requests of the server application. You may also want Citect to be able to poke data to the DDE server. The Share must be configured to grant the authority for all of the above transactions.

Use [DDEDRV]<devicename>.AdvInitData parameter to control how variables in an advise loop get initialised. See KB articles Q1848 and Q1849 for details. 


Keywords:
 

Attachments