VTScada as a Local DDE Client
When VTScada is a local DDE Dynamic Data Exchange client, data from items within a DDE server will be reported as the value of a tag in VTScada. For example, you might want a tag to mirror the value of a cell in an Excel workbook.
You can write as well as read. In the example that follows, substitute an Analog Output or Analog Control for the input tag and you will send values out, rather than read them in.
There must be one tag for each item read from (or written to).
DDE is an older technology and is not supported by all newer features of VTScada.
There are three tasks to complete for VTScada to read values from a DDE server:
- Create a DDE data source.
For example, a Microsoft Excel™ spreadsheet.
- Configure a new DDE Client tag within your VTScada application to communicate between VTScada and the DDE server.
- Configure a new input tag within your VTScada application to read a value from the data source.
Continuing the example, the value might be read from a cell in the spreadsheet.
Example: Configuring VTScada to read values from Excel spreadsheet cells:
Part 1: Excel
- Create or select a Microsoft Excel spreadsheet, containing values that you wish to read.
- Within Excel's options dialogs, the R1C1 reference option must be selected.
- Save the file to your VTScada application's folder. Example: "MySpreadsheet.xlsx"
Part 2: VTScada DDE Client tag
- Open the VTScada application that is to read values from Excel.
- Create a new DDE Client tag, providing a name.
- Open the Local DDE tab of the driver tag.
- Set the name of the DDE application to "Excel".
- Set the name of the DDE topic to the name of the spread sheet file, "MySpreadsheet.xlsx".
- The Network DDE tab is not required for a local spreadsheet.
- Click OK to save the new tag.
You may with to draw the tag to ensure that there is a connection. A Comm Indicator box is suggested.
Part 3: VTScada Input tag
- Create a new Analog Input or Analog Status tag.
- Ensure that its I/O device is the DDE Client you created in Part 2.
- Set the address to row and column of the cell you wish to read from using the format "RnCn".
For example, R1C3 will read from row 1 (A) and column 3.
- Open the Scaling tab of the analog tag.
- Set both the Unscaled and the Scaled values to range from 0 to 1.
This results in the analog tag reporting whatever value is in the spreadsheet cell. If your purposes require scaling, adjust the values as needed.
- Draw the tag as you wish.
Use VTScada as a DDE Server - How to access VTScada data from a DDE client program.
DDE Client - Required to allow VTScada to read from a DDE server program.