The DDE Client task/worksheet is used to
configure a DDE Client connection to a DDE Server application such
as Microsoft Excel (or any other Windows program supporting this
interface).
Dynamic Data Exchange (DDE) is a protocol for
dynamic data exchange between Windows applications, such as Excel.
A DDE conversation is an interaction between server and client
programs.
IWS
provides interfaces that run as clients or as servers. See DDE
Client Runtime and DDE Server in the Runtime Tasks (
Tasks on the Home tab of the ribbon).
- To run as a server, start the DDE or NetDDE server
task as described in Runtime Tasks.
- To run as a client, configure the DDE interface
worksheet on the Comm
tab.
Network Dynamic Data Exchange (NetDDE) is an
extension of DDE that works across computers on a network.
- To run IWS as a server to a NetDDE connection, you must
start the DDE Server application.
- To run IWS as a client to a NetDDE connection, use the
same DDE interface worksheets with the proper configuration to
address a IWS
project.
Note: When
running NetDDE, IWS
accepts the WRITE triggers only. To read data, you must configure a
write command on the server
computer.
To open a new DDE worksheet, right-click on the
DDE folder and click the
prompt screen.
A new
DDE
worksheet displays, as in the following figure.
The
DDE
worksheet dialog is divided into two areas:
- Header area
(top section), contains information for the whole group and defines
the tags to start the reading and writing and to receive connection
status
- Body area
(bottom section), where you define tags in the project and items
related to the DDE server application
Every DDE interface is based on addressing an
application using the following three structures:
- Application Name
- Topic
- Item
The first task is to find these identifiers in the DDE
Server application.
Use the parameters in the DDE client worksheet
Header area as follows:
- Description field:
Type a description of the DDE worksheet for documentation
purposes.
- Application Name
field: Type the DDE server application name.
- Topic field:
Specify a topic in the server application.
- Connect field:
Type a tag to control the connection of the IWS DDE client and DDE server
application. When this tag is set to 1, it requests a connection to
the server. If the connection is not possible or if it fails,
IWS sets the tag to
zero again. If the connection is OK, this value remains set to
1.
- Read Trigger
field: Type a tag to command a reading of the table. When this tag
changes value, IWS
generates polling to the DDE server. You can use this parameter
with local DDE only; you cannot use it with NetDDE servers.
- Enable Read when
Idle field: Type a tag value higher than zero to enable a
reading of the equipment.
- Read Status field:
Contains the status of the reading command.
- Write Trigger
field: Type a tag enabling IWS to generate poke commands to the
server.
- Enable Write on Tag
Change field: Type a tag value higher than zero to enable
the communication driver to check continuously for changes in a tag
value in the worksheet. When the driver detects a change occurs, it
writes the changed tag on the equipment, along with the tag's
address.
- Write Status
field: Contains the status of the writing command.
Use the DDE client Body area parameters as follows:
Configuring a NetDDE connection is similar to
configuring a DDE connection, except for the Header Application
name and topic. Before starting your tests, verify that you enable
the DDE Server on the station with which you want to exchange
data.
Note: When
connecting to servers other than IWS, please refer to the server documentation
for information about the proper syntax of APP, TOPIC,
and ITEM.
Use the NetDDE Client worksheet Header parameters to
define the tags that start reading and writing, and tags that
receive the connection status, as follows:
- Application Name
field: Type computer name\NDDE$, where
computer
name must be a valid network computer name.
- Topic field: Type
the UNISOFT$ topic name to connect
to another IWS
station.
Use the DDE client worksheet Body parameters to
relate each tag to each ITEM part of the DDE server address, as
follows:
- Tag Name field:
Specify the IWS
local database tag name that is related to some remote tag
name.
- Item field:
Specify the remote tag name that is related to the local tag
name.
Note: By
default, the DDE Client module supports DDE Servers that handle
string data in the UNICODE format. If the DDE Server handles string
data in the ASCII ANSI format, the following setting must be
configured manually in the
project_name.app file (you can use
Notepad to edit this file):
[Options]
DDEANSI=1