beautypg.com

Requesting a one-time update, Example – Echelon LNS DDE Server User Manual

Page 102

background image

-t format_name

Specifies a format name to use for formatting the data in the

outgoing message. For response messages, the LNS DDE
Server does not automatically determine the format. The

format name can be one of the five built-in formats
(INTEGER, DISCRETE, REAL, STRING, or RAW), a format name

from the standard resource file, or a format name from any
user resource file. If the format name is RAW, data will be

returned in raw format.

When changing the data format using this parameter, the
change is applied to the entire data value. This may cause

unexpected results. For example, when reading a network

variable which is a floating point value, and changing the
format to an integer (-t INTEGER), the formatted value will

be an integer interpretation of the entire floating point
number, not just the integer part. The same thing applies

when changing the data type to floating point (-t REAL) for

an integer value. Make sure formats are compatible with the
network variable value.

Note:
Floating point values must be between –3.4E38 and
+3.4E38.

See Example 2 in Sending an Application Message Update later in this chapter for an
example of how to send an application message.

Requesting a One-Time Update

To receive an application or foreign frame message that is not a response to a

request/response message, use the same procedure described for receiving network

variables, except that you must specify the topic and item as described earlier in this
chapter. Unlike network variables and configuration properties, the LNS DDE Server

cannot poll a remote device to request the value of an application or foreign frame

message; the LNS DDE Server can only receive application and foreign frame
messages and must wait for the device to send a message to it. This means that if your

application's request for an application message item is the first request for the item,
the LNS DDE Server will send an empty string or numeric Ø. The LNS DDE Server

will continue to return this initial data until the device sends a message for the item to

the LNS DDE Server.

Example

Here are three examples of what the application, topic, and item might look like when

requesting an application message update assuming the network name is AppMsg
Test, the application device name is switch, and the subsystem name is Subsystem 1.

7-10

Receiving and Sending Application Messages