Generic types ui8 and i8, Generic types ui16 and i16, Generic types ui32 and i32 – Basler Electric DECS-400 User Manual
Page 222
210
9369700990 Rev R
It should be noted that an ASCII string is not a DECS-400 generic data type. An ASCII string will be
considered as a sequence of “(string length + 1)” data of I8 type, and for its transmission via a Modbus
network, “(string length + 1)” holding registers are needed.
DECS-400 data is copied to assigned Holding Register(s) [HR] by the rules presented in the following
paragraphs.
Generic Types UI8 and I8
Data of type UI8 or I8 is copied to one holding register (HR). The high (first) HR byte always contains 0
and the second (low) HR byte contains the data.
Example:
Assume that value of UI8 type data is 0x56, and that the data is mapped to HR 44005.
The content of HR 44005 will be as listed in Table 29.
Table 29. HR 44005 Contents
HR 44004
Low Byte
HR 44005
High Byte
HR 44005
Low Byte
HR 44006
High Byte
...
0x00
0x56
...
Generic Types UI16 and I16
Data of type UINT16 or INT16 is saved in one holding register. The high data byte is copied to the high
HR byte and the low data byte is copied to the low HR byte.
Example:
Assume that DECS-400 UINT16 or INT16 type data which value is 0xF067 is mapped to HR 47003. Data
is copied to HR 47003 as shown in Table 30.
Table 30. HR 47003 Mapping
HR 47002
Low Byte
HR 47003
High Byte
HR 47003
Low Byte
HR 47004
High Byte
...
0xF0
0x67
...
Generic Types UI32 and I32
Data of type UI32 or I32 is 4 bytes long. The Modbus 4-byte long data generic types use two consecutive
registers to represent a data value. The lower numbered holding register contains the low order 16 bits,
Low Order word [LO w], and the higher numbered holding register contains the higher order 16 bits,
Higher Order word [HO w].
Example:
UI32 data type, which value is 0xE0234567 is mapped to two Holding registers (such as 45003 and
45004) as shown in Table 31.
Table 31. Typical Mapping
Register
45003
45004
Hexadecimal
4567
E023
Binary
0100 0101 0110 0111
1110 0000 0010 0011
HR 45002
LO byte
HR 45003
HO byte
HR 45003
LO byte
HR 45004
HO byte
HR 45004
LO byte
HR 45005
HO byte
...
45
67
E0
23
...
Modbus™ Communication
DECS-400