beautypg.com

Long integer data format (uint32), String data format (string) – Basler Electric DECS-250N User Manual

Page 223

background image

9440500990 Rev D

207

DECS-250N

Modbus™ Communication

Long Integer Data Format (Uint32)

The Modbus long integer data format uses two consecutive holding registers to represent a 32-bit data
value. The first register contains the low-order 16 bits and the second register contains the high-order 16
bits.

Example: The value 95,800 represented in long integer format is hexadecimal 0x00017638. This number
will read from two consecutive holding registers as follows:

Holding Register

Value

K (Hi Byte)

hex 76

K (Lo Byte)

hex 38

K+1 (Hi Byte)

hex 00

K+1 (Lo Byte)

hex 01

The same byte alignments are required to write.

Integer Data Format (Uint16) or Bit-Mapped Variables in Uint16 Format

The Modbus integer data format uses a single holding register to represent a 16-bit data value.

Example: The value 4660 represented in integer format is hexadecimal 0x1234. This number will read from
a holding register as follows:

Holding Register

Value

K (Hi Byte)

hex 12

K (Lo Byte)

hex 34

The same byte alignments are required to write.

The Uint16 Data Format is listed in Binary Points (Table 26), below.

Example: Register 900 occupies 16 rows in the Register Table where each row gives the name of specific
bit-mapped data such as 900-0 indicates bit 0 of register 900 is mapped to RF-TRIG.

Short Integer Data Format/Byte Character Data Format (Uint8)

The Modbus short integer data format uses a single holding register to represent an 8-bit data value. The
holding register high byte will always be zero.

Example: The value 132 represented in short integer format is hexadecimal 0x84. This number will read
from a holding register as follows:

Holding Register

Value

K (Hi Byte)

hex 00

K (Lo Byte)

hex 84

The same byte alignments are required to write.

String Data Format (String)

The Modbus string data format uses one or more holding registers to represent a sequence, or string, of
character values. If the string contains a single character, the holding register high byte will contain the
ASCII character code and the low byte will be zero.

Example: The string “PASSWORD” represented in string format will read as follows:

Holding Register

Value

K (Hi Byte)

‘P’

K (Lo Byte)

‘A’

K+1 (Hi Byte)

‘S’

K+1 (Lo Byte)

‘S’

K+2 (Hi Byte)

‘W’

K+2 (Lo Byte)

‘O’

K+3 (Hi Byte)

‘R’

This manual is related to the following products: