2-16
2.5 Read and write of holding register area
It is an area for reading and writing. The starting address of the read data (relative address) and the
number of data (Every one word = two bytes) are specified.
Refer item 2.4 ”Setting range and special setting ” for item of “
※
”.
Function code (Reading): 03H
■ Example of transmitting master
(starting address=00C8H, data length=2words)
Component
Data length
Data
TCP
RTU
MBAP header (only for Modbus TCP)
7
-
-
Slave address
-
1
-
Function code
1
1
03H
Data
Relative start address (high-order)
1
1
00H
Relative start address (low-order)
1
1
C8H
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
03H
Data
Number of data bytes
1
1
04H
Data 1 (high-order)
1
1
00H
Data 1 (low-order)
1
1
05H
Data 2 (high-order)
1
1
00H
Data 2 (low-order)
1
1
00H
Error check
-
2
CRC (16 bits)
Total number of bytes
13
9