TOP Server Dynamic Tag Addressing Syntax
I am addressing points in TOP Server dynamically, and do not want to define static tags in the server. I am requesting a floating point register, but it is being returned as a Word - how can I make sure I am getting the correct data Type?
When addressing a tag dynamically (regardless of what type of client connection it is i.e. SuiteLink, PDB, OPC, etc.) TOP Server will return the requested address with the default data type (for Modbus, as an example, this would be Word). If you would like the data interpreted different, please append @DATATYPE at the end of the tag reference.
For valid data types for a specific TOP Server driver, please refer to the Driver Help file. In the Configuration UI, click Help ⇒ Driver Help, and then choose your specific driver. Then look under the topic "Data Types Description". The syntax of the data type suffix MUST be one of those supported by the driver you are using.
Using Modbus as an example:
ChannelName.DeviceName.400001 will return the content of register 400001 as the default, Word, datatype.
Addressing the register as:
ChannelName.DeviceName.400001@FLOATwill read the contents of registers 400001 and 400002 and interpret them as a floating point value
The @DATATYPE syntax can be modified to @DATATYPE,SCANRATE to also specify the scan rate on a per-point basis:
ChannelName.DeviceName.400001@FLOAT,100will request the content of 4000001 and 4000002, interpreted as a floating point value, and set the requested scan rate to 100 ms
The data types below are valid for the TOP Server Modbus Drivers:
|
Data Type Suffix |
Description |
|
Boolean |
Single bit |
|
Byte |
Unsigned 8-bit value |
|
Char |
Signed 8-bit value |
|
Word |
Unsigned 16-bit value |
|
Short |
Signed 16-bit value |
|
DWord |
Unsigned 32-bit value |
|
Long |
Signed 32-bit value |
|
BCD |
Two byte packed BCD, four decimal digits |
|
LBCD |
Four byte packed BCD, eight decimal digits |
|
Float |
32-bit IEEE floating point |
|
Double |
64-bit IEEE floating point |
|
Date |
64-bit Date/Time |
|
String |
Null terminated character array |