Applies To:
  • CitectSCADA 2.00 2.01 3.00

An illustrative example on how to use network DDE. 

First, make sure both machines have the correct DDE setup in SYSTE.INI (See Q1392 and Q1206), eg

EXCEL$ = Excel, Sheet1,,15,,0,,0,0,0

//sheet1 refers to the first sheet of the current Excel page

Method 1

In Citect,, use DDEhInitiate("\\remotePCName\NDDE$ ", "Excel$") to get a handle k

and write to Excel by DDEhPoke(k, "R1C1", 777).

Then in the remote Excel, R1C1 of sheet1 should have 777 appeared. You may also use DDEhRequest(k, "R1C1") to read the value back, but it cannot to be done in the Cicode kernel due to the nature of blocking function.

Finally, remember to use DDEhTerminate(k) to terminate the handle after each call.

Method 2

Use DDEWrite("\\RemotePCName\NDDE$", "Excel$", "R1C1", 777) and DDERead("\\RemotePCName\NDDE$", "Excel$", "R1C1") to achieve the same results as described in method 1.