DDE Client communication protocol
Supported device types and versions
Communication line configuration
Communication station configuration
I/O tag configuration
Literature
Changes and modifications
Document revisions
Supported device types and versions
Communication supports the DDE Client access using the XlTable data format (the format used by e.g. MS Excel, Wonderware Intouch I/O Servers) or CF_TEXT data format.
Communication line configuration
Communication with the DDE Server requires a separate line. Accessing several servers from one communication line is not possible.
- Communication line category: DDE.
- Line parameters (the DDE - parameters tab):
- Server - DDE server name (e.g. MS Excel „Excel“).
- Impersonate user - if the option is checked, the communication line will connect with the following name and password to the NetDDE.
- Name - system user name.
- Password - system user password.
Note: The user you want to impersonate must have Log on as a batch Job system privileges.
Communication station configuration
- Communication protocol: DDE Client.
- The station address is the DDE Topic name (a string containing up to 50 characters).
Station protocol parameters
Table 1
Keyword | Full name | Meaning | Unit | Default value |
---|---|---|---|---|
REQ | Request | If the value is Yes, after each writing a value, a request for the reading of the value will be sent. | YES/NO | NO |
TYPE | Server Type | Type of the DDE server for communication:
| COLD/WARM | WARM |
FORMAT | Data Format | The Data clipboard format to be used for data transmission. | XLTABLE/TEXT | XLTABLE |
TIMEOUT | Transaction Timeout | A timeout of the function DdeClientTransaction, which determines the maximum amount of time (in milliseconds), that the DDE client will wait for a response from the DDE server in the synchronous transaction. | ms | 1000 |
I/O tag configuration
Possible types: Ai, Ao, Ci, Co, Di, Do, TxtI, TxtO.
The address is the DDE Cell name (a string containing up to 50 characters).
Note: If the initialization of the connection to the server, topic, or cell has failed, the attempt to connect is repeated in the interval of 5 seconds. The same is true also when the connection is lost (server shutdown etc.).
Connection to the server via NetDDE
If the DDE server is installed on other PC within a local computer network, you can establish a connection via the NetDDE interface. For such a connection the following rules apply:
- DDE server name (in the line configuration) is defined in the form of \\computer_name\server, where computer_name is the network name of the PC with running DDE server (e.g. \\WRK_PC\Excel).
- On the PC with running DDE server, the Network DDE service must be running. You can run it also manually: Start menu -> Settings -> Control Panel -> Services, find Network DDE, and click Start. In case you need an automatic start-up, change the Startup type to Automatic -> OK.
- On the PC with aD2000 KOM process as a DDE Client, the Network DDE service is run automatically at the first request for the NetDDE server. If you are experiencing a problem with access rights, the Logon dialog box for entering access name and password, which are valid on the PC with the DDE server, will be displayed. Usually, it is necessary to use the Win NT system utility "ddeshare" on the PC with the DDE server for configuration of access rights of individual users to individual DDE servers, topics, and cells.
Example of communication testing
It is possible using the MS Excel program. Run the MS Excel as the DDE server using the switch /e e.g. from the command prompt - excel.exe /e.
Complete access to a DDE cell is in the following format:
Excel|Sheet1!”R1C1”
Where:
- Excel is the server name. Configure a line of DDE category and enter the DDE server name to Excel.
- Sheet1 is a topic name. Configure the station with protocol = "DDE Client" and enter the DDE topic name Sheet1. Other sheets have similar names in the form Sheetx unless those sheets have been renamed.
- R1C1 is the name of a DDE cell. Configure an I/O tag and enter the DDE cell name R1C1. The name means Row 1, Column 1. The other cells have similar names in the form RxCy (e.g. R2C12).
This naming is valid only for English versions of MS Excel.
Literature
-
Changes and modifications
- May 20th, 2002 - added TEXT data format + COLD/WARM link.
Document revisions
- Ver. 1.1 – February 8th, 2000 – document update
Related pages:
0 komentárov