Use VTScada as a DDE Server
In your client program, you must provide address information for the VTScada program, the name of the running application, the names of the tags you wish to query, and the name of the property you want to obtain from each tag (usually '\value').
The most common use-case is to configure Microsoft Excel to display VTScada tag values in the cells of a spreadsheet. This can be done using a formula for each cell, as follows.
The formula has four parts: the name of the program (VTS), the name of the application, the name of the tag, and the property of the tag to obtain.
As entered in an Excel spreadsheet cell, the formula would follow this form:
This formula is not literal; the various components are described in the following table.
If there are multiple display manager windows, the reference must be to a specific display manager session. The format changes to =VTS|'AppName 1' !'TagName\Value' (or 2, etc). Without this change, you will get an error message that Excel cannot start VTS.
If the tag name you've specified has spaces, back-slashes, or other characters that Excel might interpret as anything other than the name, then you must surround the 'Tag Name\Property' portion of the function with single quotes as shown. It is advisable to do this for every instance, whether required or not.
The equals sign (=) indicates to Excel that this is a formula.
VTS is literal, specifying the name of the program to access.
The pipe character separates the program name from the document or topic name. (In the case of VTScada, this is the application name.)
Following the pipe character is the application name.
The exclamation point character is the topic item delimiter, separating the application name from the tag to which you are referring.
Following the exclamation point character should be the name of the tag whose data you want to report in the spreadsheet cell. The tag name should appear exactly as it is displayed in the name property of the tag properties folder.
The back slash character (\) is the scope operator, separating the tag name from the property or data to which you are referring.
The name of one of the tag's properties, whose value you want to report in the cell. In most cases, this will be Value, but it could also be, Name, Area, Description, etc.
The following formula examples have been provided to assist you in setting up Excel spreadsheet cells to read values from VTScada tags.
Given an application named, "DDE Test" and containing a tag named "AnalogInputTag"...
To display the tag's value in a spreadsheet cell:
To display the name of the same tag's associated I/O device:
To display the description of the same tag:
The name of the tag configuration variable you are requesting must be written exactly as it occurs in the tag's code. If you are unsure, use the Source Debugger to examine an instance of the tag type.
VTScada as a Local DDE Client - How VTScada can read from (and write to) a DDE server program.
Trihedral and VTScada are registered trade marks of Trihedral Engineering Ltd.
© Trihedral Engineering Ltd. 1983- 2019 All rights reserved.