Accessing configuration property user formats – Echelon LNS DDE Server User Manual
Page 90
-t type_name
Specifies a format name to use for formatting the
configuration property as described in the next section. If
this option is not specified, a format is selected by LNS. Use
this option and specify a format name to change 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 (for SNVTs and SCPTs), 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.
Accessing Configuration Property User Formats
Each configuration property type has a default format. An LNS network tool such as
the LonMaker Integration Tool can change the default format for any configuration
property. For example, the LonMaker browser allows a user to assign a custom
format to any configuration property by right-clicking the value and selecting the
Change Format command. To change the format, use the –t parameter described in
the previous section. You may either specify a standard format, or specify a user
format from a user format file as described in Appendix A, Resource Files, using the
following syntax:
#
The fields are defined as follows:
program id
The program ID specified in the format file, in hex, without
spaces or colons. This does not have to match the program ID
for the device containing the network variable.
selector
The scope selector specified in the format file. The second line
of the format file specifies a scope name that specifies which
device types are covered by the format file. Translate this
selector name to a scope selector using the following table:
6-4
Reading and Writing Configuration Properties