2-3
2.4 Reading of input register area
It is an area only for reading. The starting address of the read data (relative address) and the number
of data (Every one word = two bytes) are specified.
Function code: 04H
■
Example of transmitting master(starting address=0032H, data length=2words)
Component
Data length
Data
TCP
RTU
MBAP header (only for Modbus TCP)
7
-
-
Slave address
-
1
-
Function code
1
1
04H
Data
Relative start address (high-order)
1
1
00H
Relative start address (low-order)
1
1
32H
Read data count (high-order)
1
1
00H
Read data count (low-order)
1
1
02H
Error check
-
2
CRC (16 bits)
Total number of bytes
12
8
■
Example of slave's responding (starting address=0032H, data length =2words)
Component
Data length
Data
TCP
RTU
MBAP header (only for Modbus TCP)
7
-
-
Slave address
-
1
-
Function code
1
1
04H
Data
Number of data bytes
1
1
04H
Data 1 (high-order)
1
1
00H
Data 1 (low-order)
1
1
09H
Data 2 (high-order)
1
1
00H
Data 2 (low-order)
1
1
0AH
Error check
-
2
CRC (16 bits)
Total number of bytes
13
9