2. MODBUS Protocol Description
2.6.4 Read Input Registers (Function Code 0x04)
Function Code
Starting Address
Quantity of Registers
Function Code
Byte Count
Quantity of Registers
Function Code
Exception Code
Here is an example of a request to read input register 9:
Segment
Function Code
Starting Address: High
Starting Address: Low
Quantity of Input Registers: High
Quantity of Input Registers: Low
Note:
1. The 0x0000 is the address of Register [1]
2. The 0x0008 is the address of Register [9]
*N = quantity of input registers
Read Input Registers
Request
Hex
04
00
08
00
01
Request
1 Byte
2 Bytes
2 Bytes
Response
1 Byte
1 Byte
N *x2 Bytes
Error
1 Byte
1 Byte
Segment
Function Code
Byte Count
Input Register 9: High
Input Register 9: Low
11
0x04
0x0000~0xFFFF
1~125 (0x7D)
0x04
2xN *
0x84
01 or 02 or 03 or 04
Response
Hex
04
02
00
0A