15
2 Modbus protocol description
2.5 Data types
Data
type
Description Access Possible
function
codes
Number
of
Modbus
register
Byte Low byte of a word as an integer value; the high byte is not used read only 03, 04 1
Value ranges:
0 to 255 for unsigned data
-127 to 127 for signed data
read/write 03, 04, 06, 16
Word Word as integer value read only 03, 04 1
Value ranges:
0 to 65535 for unsigned data
-32767 to 32767 for signed data
read/write 03, 04, 06, 16
Float 2 words as 32-bit floating-point number with coding to IEEE 754,
whereby it must be kept in mind that bytes 1 and 2 are inter-
changed with bytes 3 and 4 during transmission
read only 03, 04 2
S=Sign bit
E = Exponent (two's complement)
M = 23-bit normalized mantissa
IEEE 754 standard coding:
read/write 03, 04, 16
Byte 1 Byte 2 Byte 3 Byte 4
SEEEEEEE EMMMMMMM MMMMM-
MMM
MMMMMMMM
Modbus coding of floating-point variables in
device type 703571:
Address of the 1st
Modbus variable register
Address of the 2nd
Modbus variable register
Byte 3 Byte 4 Byte 1 Byte 2
MMMMMMMM MMMMM-
MMM
SEEEEEEE EMMMMMMM
When creating customer-specific applications, the correct
byte sequence in storage format needs to be checked. Many
compilers use the following storage format:
Byte 4 Byte 3 Byte 2 Byte 1
MMMMMMMM MMMMM-
MMM
EMMMMMMM SEEEEEEE
Address x Address x+1 Address x+2 Address x+3