0% found this document useful (0 votes)
79 views15 pages

DDE Client Driver

The DDE Client Driver provides an easy way to connect DDE clients to OPC clients. It allows communication with any DDE server that supports standard CF TEXT format. The driver automatically reestablishes connections when servers reconnect. It monitors links and will reinitialize if connections fail. Tags represent data items from DDE servers and their addresses specify the server, topic, and item name.

Uploaded by

cementsaim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views15 pages

DDE Client Driver

The DDE Client Driver provides an easy way to connect DDE clients to OPC clients. It allows communication with any DDE server that supports standard CF TEXT format. The driver automatically reestablishes connections when servers reconnect. It monitors links and will reinitialize if connections fail. Tags represent data items from DDE servers and their addresses specify the server, topic, and item name.

Uploaded by

cementsaim
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

DDE Client Driver Help

© 2012 Kepware Technologies


2 DDE Client Driver Help

Table of Contents
Table of Contents 2
DDE Client Driver Help 3
Overview 3
Driver Setup 4
ReinitializeDDE Tag 5
Data Types Description 6
Address Descriptions 7
Error Descriptions 8
Address Validation 8
Address '<address>' is out of range for the specified device or register 8
Array support is not available for the specified address: '<address>' 8
Data Type '<type>' is not valid for device address '<address>' 9
Device address '<address>' contains a syntax error 9
Device address '<address>' is not supported by model '<model name>' 9
Device address '<address>' is Read Only 9
Missing address 9
Device Status Messages 9
Device '<device name>' is not responding 10
Unable to write to '<address>' on device '<device name>' 10
DDE Client Driver Specific Messages 10
DDE data error on link '<server name>', '<topic name>', '<item name>' detected 10
DDEML failed to initialize 11
DDEML reports low memory error 11
Failed to connect server '<server name>' topic '<topic name>' 11
Failed to establish hot link to '<server name>', '<topic name>', '<item name>' 11
Reinitialization failed 12
Server '<server name>' topic '<topic name>' disconnected 12
Index 13

www. kepware.com
3 DDE Client Driver Help

DDE Client Driver Help


Help version 1.013

CONTENTS

Overview
What is the DDE Client Driver?

Driver Setup
How do I configure the DDE Client Driver to communicate with DDE servers?

Data Types Description


What data types are supported by this driver?

Address Descriptions
How do I address a data location on a DDE server?

Error Descriptions
What error messages are produced by the DDE Client Driver?

Overview
The DDE Client Driver provides an easy and reliable way to connect DDE Clients to OPC Client applications, includ-
ing HMI, SCADA, Historian, MES, ERP and countless custom applications.

Features

l The server provides single-point management of multiple DDE servers through OPC.
l The DDE Client Driver can communicate with any server that supports the standard CF TEXT DDE data for-
mat. It automatically reconnects when DDE servers are brought back online.
l Clients may reside on remote machines and communicate with this driver via OPC or NetDDE; however,
the current version of this driver cannot access data from DDE servers running on remote machines.

Note: A ReinitializeDDE Tag is provided for the resolution of DDE communication failures. For more information,
refer to ReinitializeDDE Tag.

www. kepware.com
DDE Client Driver Help 4

Driver Setup
In the DDE Client Driver, the device in the OPC server project does not necessarily correspond to a physical
device on a network. The device is actually a DDE client program that collects data provided by the various DDE
servers on the system.

Important: The DDE Client Driver only supports one channel with one device (or one DDE client program). That
device may be used to communicate with any number of physical devices through the DDE server applications,
however. Furthermore, the OPC server project can have additional channels that use other drivers.

DDE Server Communications


Users may change the DDE Server Communication parameters at any time by right-clicking on the DDE Client
Driver device and then selecting Properties | DDE Server Communications.

Descriptions of the parameters are as follows:

l Request initial update after x seconds: This parameter specifies the amount of time that the driver
should wait for a link's initial update before ensuring it an explicit request. This setting is useful for DDE
servers that do not automatically send their clients an item's current value once a link to that item is
made.

Note: Some DDE servers perform poorly when updates are requested while a large number of links are
being created. It is recommended that a larger value be specified for these servers in order to allow time
for all links to be created before the driver begins issuing requests for initial updates. Servers that auto-
matically send initial updates when links are created should work well with any value.
l Check DDE servers every x seconds: This parameter specifies the amount of time that the driver will
wait before checking whether all DDE links have received a data update. The valid range is 0 to 300 sec-
onds. A value of zero disables the link check. The default setting is 15 seconds.

Note 1: This driver uses hot links, where a DDE server only passes data to the driver when the data value
has changed. This provides a significant performance advantage over the alternative request/response
loop approach because DDE transactions can be time consuming. The disadvantage of this method is that
the driver may not receive notice that a DDE server has become unavailable (such as in an abnormal shut-
down). Because of this possibility, users should configure the driver to check the DDE links. When check-
ing a link, the driver makes an explicit request for data from the DDE server. If the DDE server does not
respond to this request, the driver will attempt to reconnect. If the attempt fails, a message will be placed
in the OPC server's Event Log, and the driver will continue attempting until the problem is resolved.

www. kepware.com
5 DDE Client Driver Help

Note 2: If a value of zero is chosen, the ReinitializeDDE Tag may need to be used in order to rebuild all
links after a DDE server is brought back up. For more information, refer to ReinitializeDDE Tag.

Defining Tags
A tag must be created for each DDE item that will be available to OPC clients. For information on specifying the
link between a tag and an item provided by a DDE server, refer to Address Descriptions.

ReinitializeDDE Tag
The DDE Client Driver is usually able to automatically establish a hot link whenever a DDE server makes a properly
addressed item available. It can also detect when that item becomes unavailable. In rare cases, it may be nec-
essary to reinitialize the driver in order to properly link with DDE items after a communications breakdown. This
operation is initiated by writing True (any non-zero value) to the ReinitializeDDE Tag. Success or failure will be
reported in the OPC server's Event Log. Common causes of failure include one or more tags with an invalid
address, and DDE servers that are not currently running.

Note: The ReinitializeDDE Tag is automatically created by the driver, and is located through the client's tag
browser in the "<device name>.InternalTags" group. If the OPC Quick Client is launched from the OPC server,
the ReinitializeDDE Tag will be placed at the device level.

www. kepware.com
DDE Client Driver Help 6

Data Types Description

Data Type Description


Boolean Single bit
Byte Unsigned 8 bit value

bit 0 is the low bit


bit 7 is the high bit
Char Signed 8 bit value

bit 0 is the low bit


bit 6 is the high bit
bit 7 is the sign bit
Word Unsigned 16 bit value

bit 0 is the low bit


bit 15 is the high bit
Short Signed 16 bit value

bit 0 is the low bit


bit 14 is the high bit
bit 15 is the sign bit
DWord Unsigned 32 bit value

bit 0 is the low bit


bit 31 is the high bit
Long Signed 32 bit value

bit 0 is the low bit


bit 30 is the high bit
bit 31 is the sign bit
Float 32 bit Floating point value.

The driver interprets two consecutive 16 bit registers as a Floating


point value by making the second register the high word and the first
register the low word.
Double 64 bit Floating point value
String Zero terminated character array. This driver limits string lengths to
256 characters.

Note: The default data type is DWord.

www. kepware.com
7 DDE Client Driver Help

Address Descriptions
The DDE Client Driver supports standard DDE addressing. An example of the syntax is as follows:

<DDE Service Name>|<Topic Name>!<Item Name>

Descriptions of the elements are as follows:

l DDE Service Name: The name that an application exposes for DDE communication. It is often the same
as the application name.
l Topic Name: The name that an application gives to a logical grouping of addressable items.
l Item Name: The name of the specific data item associated with a topic.

Note 1: An example of the syntax is "Excel|Sheet3!R1C1". This example demonstrates how to access a value
from a Microsoft Excel spreadsheet. The DDE service name is "Excel," the topic name is the name of the sheet
that will be accessed ("Sheet3"), and the item name is the spreadsheet cell that will be accessed ("R1C1" for row
1 and column 1). These same principles can be applied to any DDE server.

Note 2: For a specific DDE server application's service, topic and item names, refer to its documentation.

Addressing Notes

1. The address is not case sensitive.

2. An equal sign (=) may precede an address, but will be ignored by the driver.

3. Single quotation marks will not be removed before an address is passed to the DDE server application. For
example, "Excel|'Sheet3'!R1C1" will not work because there are no single quotes in the worksheet name.
Instead, the address should be "Excel|Sheet3!R1C1".

4. Spaces are valid and will be passed to the DDE server application. For example, "Excel|Test Sheet!R1C1"
is valid. There is a space between Test and Sheet.

5. This driver cannot address data on remote machines using NetDDE; thus, any address containing the
string "ndde$" is invalid. The client application can access the data collected by this driver via NetDDE
and OPC.

6. The DDE Client Driver will accept any address that has valid syntax, but it will not tell if the specified DDE
server, topic, and item are available until a tag is made active by a client application. If a link for that tag
cannot be made at that time, the tag's data quality will be set to bad and an appropriate error message will
be placed in the OPC server's Event Log. For more information, refer to Error Descriptions. service
name; however, users may experience difficulties establishing links to these items.

7. Although the OPC server can also act as a DDE server, users should not attempt to access its items with
this driver. Any address using the default service name of the OPC server will not be accepted. This
should not present a problem because the purpose of this driver is to provide OPC connectivity to other
DDE servers via the OPC server and this driver. This driver allows users to connect to items in the OPC
server in order to change its default DDE

www. kepware.com
DDE Client Driver Help 8

Error Descriptions
The following error/warning messages may be generated. Click on the link for a description of the message.

Address Validation
Address '<address>' is out of range for the specified device or register
Array support is not available for the specified address: '<address>'
Data Type '<type>' is not valid for device address '<address>'
Device address '<address>' contains a syntax error
Device address '<address>' is not supported by model '<model name>'
Device address '<address>' is Read Only
Missing address

Device Status Messages


Device '<device name>' is not responding
Unable to write to '<address>' on device '<device name>'

DDE Client Driver Specific Messages


DDE data error on link '<server name>', '<topic name>', '<item name>' detected
DDEML failed to initialize
DDEML reports low memory error
Failed to connect server '<server name>' topic '<topic name>'
Failed to establish hot link to '<server name>', '<topic name>', '<item name>'
Reinitialization failed
Server '<server name>' topic '<topic name>' disconnected

Address Validation
The following error/warning messages may be generated. Click on the link for a description of the message.

Address Validation
Address '<address>' is out of range for the specified device or register
Array support is not available for the specified address: '<address>'
Data Type '<type>' is not valid for device address '<address>'
Device address '<address>' contains a syntax error
Device address '<address>' is not supported by model '<model name>'
Device address '<address>' is Read Only
Missing address

Address '<address>' is out of range for the specified device or register


Error Type:
Warning

Possible Cause:
A tag address that contains the DDE service name of the OPC server has been entered.

Solution:
The OPC server should not use the DDE Client Driver to serve data to itself.

Array support is not available for the specified address: '<address>'


Error Type:
Warning

Possible Cause:
A tag address that has been specified statically contains an array reference for an address type that doesn't sup-
port arrays.

Solution:
Re-enter the address in the client application to remove the array reference or correct the address type.

www. kepware.com
9 DDE Client Driver Help

Data Type '<type>' is not valid for device address '<address>'


Error Type:
Warning

Possible Cause:
A tag address that has been specified statically has been assigned an invalid data type.

Solution:
Modify the requested data type in the client application.

Device address '<address>' contains a syntax error


Error Type:
Warning

Possible Cause:
A tag address that has been specified statically contains one or more invalid characters.

Solution:
Re-enter the address in the client application.

Device address '<address>' is not supported by model '<model name>'


Error Type:
Warning

Possible Cause:
A tag address that has been specified statically references a location that is valid for the communications protocol
but not supported by the target device.

Solution:
Verify that the address is correct; if it is not, re-enter it in the client application. Also verify that the selected
model name for the device is correct.

Device address '<address>' is Read Only


Error Type:
Warning

Possible Cause:
A tag address that has been specified statically has a requested access mode that is not compatible with what the
device supports for that address.

Solution:
Change the access mode in the client application.

Missing address
Error Type:
Warning

Possible Cause:
A tag address that has been specified statically has no length.

Solution:
Re-enter the address in the client application.

Device Status Messages


The following error/warning messages may be generated. Click on the link for a description of the message.

Device Status Messages


Device '<device name>' is not responding
Unable to write to '<address>' on device '<device name>'

www. kepware.com
DDE Client Driver Help 10

Device '<device name>' is not responding


Error Type:
Serious

Possible Cause:
1. The serial connection between the device and the host PC is broken.
2. The communication parameters for the serial connection are incorrect.
3. The named device may have been assigned an incorrect Network ID.
4. The response from the device took longer to receive than the amount of time specified in the "Request Timeout"
device setting.

Solution:
1. Verify the cabling between the PC and the device.
2. Verify that the specified communication parameters match those of the device.
3. Verify that the Network ID given to the named device matches that of the actual device.
4. Increase the Request Timeout setting so that the entire response can be handled.

Unable to write to '<address>' on device '<device name>'


Error Type:
Serious

Possible Cause:
1. The serial connection between the device and the host PC is broken.
2. The communication parameters for the serial connection are incorrect.
3. The named device may have been assigned an incorrect Network ID.

Solution:
1. Verify the cabling between the PC and the device.
2. Verify that the specified communication parameters match those of the device.
3. Verify that the Network ID given to the named device matches that of the actual device.

DDE Client Driver Specific Messages


The following error/warning messages may be generated. Click on the link for a description of the message.

DDE Client Driver Specific Messages


DDE data error on link '<server name>', '<topic name>', '<item name>' detected
DDEML failed to initialize
DDEML reports low memory error
Failed to connect server '<server name>' topic '<topic name>'
Failed to establish hot link to '<server name>', '<topic name>', '<item name>'
Reinitialization failed
Server '<server name>' topic '<topic name>' disconnected

DDE data error on link '<server name>', '<topic name>', '<item name>'
detected
Error Type:
Serious

Possible Cause:
1. The driver was unable to convert CF_TEXT data from a DDE server to a numerical type.
2. An attempt was made to write a string that is too long.

Solution:
1. Ensure that the DDE server is configured to send numerical data (in CF_TEXT format) if the client is expecting
numerical data.
2. Ensure that strings are within length requirements.

See Also:
Data Types Description

www. kepware.com
11 DDE Client Driver Help

DDEML failed to initialize


Error Type:
Fatal

Possible Cause:
The Microsoft Windows DDE Management Library .dll failed to register the DDE Client Driver properly.

Solution:
Shut down all unnecessary applications and restart the OPC server project.

DDEML reports low memory error


Error Type:
Serious

Possible Cause:
The Microsoft Windows DDE Management Library dll has exceeded its resource limit due to a prolonged race con-
dition. This occurs when the server outruns the client.

Solution:
1. If possible, decrease the update rate of the DDE server.
2. Reduce the size of the OPC server project.

Failed to connect server '<server name>' topic '<topic name>'


Error Type:
Serious

Possible Cause:
1. The address is incorrect.
2. The DDE server is not running.
3. The DDE server does not support the specified topic.

Solution:
1. Ensure that the address is correct.
2. Ensure that the DDE server is running.
3. Ensure that the DDE server supports specified topic.
4. If a zero has been specified as the server check interval, use the ReinitializeDDE Tag.

See Also:
Driver Setup
ReinitalizeDDE Tag

Failed to establish hot link to '<server name>', '<topic name>', '<item name>'
Error Type:
Serious

Possible Cause:
1. The address is incorrect.
2. The DDE server is not running.
3. The DDE server does not support the specified item.

Solution:
1. Ensure that the address is correct.
2. Ensure that the DDE server is running.
3. Ensure that the DDE server supports specified item.
4. If a zero has been specified as the server check period, use the ReinitializeDDE Tag.

See Also:
Driver Setup
ReinitalizeDDE Tag

www. kepware.com
DDE Client Driver Help 12

Reinitialization failed
Error Type:
Serious

Possible Cause:
One or more links could not be made.

Solution:
Check to see if the server in question is running and supports the specified topic and item.

Server '<server name>' topic '<topic name>' disconnected


Error Type:
Serious

Possible Cause:
The specified DDE server has stopped running.

Solution:
1. Restart the DDE server in question.
2. If a zero has been specified for the server check period, use the ReinitializeDDE Tag.

See Also:
Driver Setup
ReinitalizeDDE Tag

www. kepware.com
13 DDE Client Driver Help

Index

Address '<address>' is out of range for the specified device or register 8


Address Descriptions 7
Address Validation 8
Array support is not available for the specified address: '<address>' 8

BCD 6
Boolean 6

Data Type '<type>' is not valid for device address '<address>' 9


Data Types Description 6
DDE Client Driver Specific Messages 10
DDE data error on link '<server name>', '<topic name>', '<item name>' detected 10
DDEML failed to initialize 11
DDEML reports low memory error 11
Device '<device name>' is not responding 10
Device address '<address>' contains a syntax error 9
Device address '<address>' is not supported by model '<model name>' 9
Device address '<address>' is Read Only 9
Device Status Messages 9
Driver Setup 4
DWord 6

Error Descriptions 8

www. kepware.com
DDE Client Driver Help 14

Failed to connect server '<server name>' topic '<topic name>' 11


Failed to establish hot link to '<server name>', '<topic name>', '<item name>' 11
Float 6

LBCD 6
Long 6

Missing address 9

Overview 3

Reinitialization failed 12
ReinitializeDDE Tag 5

Server '<server name>' topic '<topic name>' disconnected 12


Short 6
String 6

www. kepware.com
15 DDE Client Driver Help

Unable to write tag '<address>' on device '<device name>' 10

Word 6

www. kepware.com

You might also like