
3) 0x04 Read Input Register
Example: Requesting the device to read data from input registers 32–34
Request packet: 01 04 00 20 00 03 B1 C1
Response packet: 01 04 06 00 05 00 0A 00 10 8D 5D
Domain Name
(Hexadecimal
Value)
Domain Name
Modbus address
1
Modbus address
Function code
4
Function code
Start address Hi
0
Byte quantity
Start address Lo
20
Hi of input register 32
Hi of the input register quantity
0
Lo of input register 32
Lo of the input register quantity
3
Hi of input register 33
Check code Hi
B1
Lo of input register 33
Check code Lo
C1
Hi of input register 34
Lo of input register 34
Check code Hi
Check code Lo
(Hexadecimal
Value)
1
4
6
0
5
0
0A
0
10
8D
5D
Request Packet
Response Packet
4) 0x06 Write Single Holding Register
Example: Requesting the device to write the hexadecimal 00 14 to register 4
Request packet: 01 06 00 04 00 14 C8 04
Response packet: 01 06 00 04 00 14 C8 04
Domain Name
(Hexadecimal
Value)
Domain Name
(Hexadecimal
Value)
Modbus address
1
Modbus address
1
Function code
6
Function code
6
Register address Hi
0
Output address Hi
0
Register address Lo
4
Output address Lo
4
Register value Hi
0
Output value Hi
0
Register value Lo
14
Output value Lo
14
Check code Hi
C8
Check code Hi
C8
Check code Lo
4
Check code Lo
4
Request Packet
Response Packet
09