Data Suffixes for Tag I/O Addressing

The data type to read from or write to is usually implied by the address. If it is not, the strings shown in the following table may be appended to the address (without spaces) to force the data to be interpreted as a specific type. Not all suffixes apply to all drivers.

Suffix Meaning
/AB3Float Allen-Bradley PLC/3 Floating Point (4 bytes) (Used for Allen-Bradley exclusively)
/AB5Float Allen-Bradley PLC/5 Floating Point (4 bytes) (Used for Allen-Bradley exclusively)
/BCD2 2-digit (1 byte) Binary Coded Decimal
/BCD3 3-digit (2 bytes - lowest 12 bits) Binary Coded Decimal
/BCD4 4-digit (2 bytes) Binary Coded Decimal
/BCD8 8-digit (4 bytes) Binary Coded Decimal
Note: while any driver may use this suffix to read data, only the Modbus Compatibly can use it to write data.
/Bit Attempts to convert the value to a single bit. The bit number used is always 0. (ex: 40001/Bit)
/Double IEEE Double Precision Floating Point (8 bytes)
/Float IEEE Single Precision Floating Point (4 bytes)
/SByte Signed Byte
/SDWord Signed 32-bit Integer.
If used in combination with /Bit, /SDword comes last:
example: 40001/0/SDWord
/SWord Signed 16-bit Integer
/UByte Unsigned Byte
/UDWord Unsigned 32-bit Integer
/UWord Unsigned 16-bit Integer

For example:

40001/UDWord

Reading Strings

If reading string data, note that not all PLCs will store characters in the same in order in registers. Further, registers may vary in size from one PLC type to another.

If the string read from your registers has characters that are not in the order you expected, use the BuffOrder() function in an expression to swap the order of the characters so that they do match what is expected. Do this by creating one I/O and Calculations tag to read the value, then create a second with an expression to read the value in the first and apply the BuffOrder function. The second I/O and Calculations tag will not count against your license because it does not use a read or write address.

Better practice is to program the PLC to send an integer code that can be mapped to a phrase in VTScada. The result can be used in a multilingual application and can reduce the amount of data transmitted.

Example: A BuffOrder call for a word-sized register with the character order swapped:

BuffOrder([<SourceTag>], 0, 1, 2, N) 

...where the value N should be the half the length of the buffer.

 

Each I/O device uses a different addressing system. Details can be found in the following topics: