Data Types and Registers


What you will find in this section:

  1. Data types and registers
  2. Related topics

 

Data types and registers

 

The Modbus specifications does not include requirements on how various data types are to be displayed on the respective register.


The specification only defines that the register has to be represented as “big endian”. This means that the high byte of a register is sent first, followed by the low byte.

 

8-bit integer types:
Example: Value = 1 (0x01)

 

Register address

Register contents (hex)

n

0x0001

 

16-bit integer types:

Example: Value = 4660 (0x1234)

 

Register address

Register contents (hex)

n

0x1234

 

32-bit integer types:

Example: Value = 305419896 (0x12345678)

 

Register address

Register contents (hex)

n

0x5678

n +1

0x1234

 

32-bit IEE 754 floating point:

Example: Value = 123.456 (0x42F6E979)

 

Register address

Register contents (hex)

n

0xE979

n +1

0x42F6

 

ASCII strings:

Example: Value = EEM-MA (0x45, 0x45, 0x4D, 0x2D, 0x4D, 0x41, 0x33, 0x37, 0x30 -> ASCII coded)

 

Register address

Register contents (hex)

n

0x4545

n +1

0x2D4D

n +2

0x414D

n +3

0x3733

n +4

0x0030

 

 


EMpro online documentation
Published/reviewed: 2024-12-03, en revision 002Version history