Reading Values from a DDE Application
- Last UpdatedSep 16, 2025
- 1 minute read
To read a value into a Plant SCADA variable directly from an external DDE server application currently running on the same computer as Plant SCADA, use the Cicode DDERead() function. For example:
PV1 = DDERead("Excel", "[Book1]Sheet1", R1C1);
The data from Row 1, Column 1 on Sheet 1 of Book 1 in Excel is read and stored in the Plant SCADA variable "PV1". This DDE function is one-way, and will need to be called whenever the value needs to be updated in Plant SCADA.
Reading from a DDE server assumes a prior knowledge of the DDE server. In the above example, Excel needs to be running and the appropriately named spreadsheet needs to exist. The Plant SCADA variable PV1 needs to also have been previously declared.
Note: Instead of using the once only DDERead(), use the multiple use DDE handle function DDEhRequest().
Verify that remote requests are enabled in the other application. For example, in Excel, you need to confirm that the Ignore other applications check box is cleared (the default setting).
The High security setting (if selected) on Microsoft Office does not appear to affect the use of remote DDE Client requests with those Office applications. See Use DDE with Microsoft Office Applications.