2-18
Function code (continuous writes): 10H
*
It is used only when registering production information.
■ Example of master transmission (with a start address of 1b58H and a data count of 20)
Component
Data length
Data
TCP RTU
MBAP header (only for Modbus TCP)
7
-
-
Slave address
-
1
-
Function code
1
1
10H
Data
Relative start address (high-order)
1
1
1bH
Relative start address (low-order)
1
1
58H
Write data count (high-order)
1
1
00H
Write data count (low-order)
1
1
14H
Number of data bytes
1
1
28H
Data 00 (high-order)
1
1
00H
Data 00 (low-order)
1
1
00H
Data 01 (high-order)
1
1
31H
Data 01 (low-order)
1
1
32H
Data 02 (high-order)
1
1
33H
Data 02 (low-order)
1
1
34H
...
Data 16 (high-order)
1
1
30H
Data 16 (low-order)
1
1
30H
Data 17 (high-order)
1
1
00H
Data 17 (low-order)
1
1
00H
Data 18 (high-order)
1
1
00H
Data 18 (low-order)
1
1
00H
Data 19 (high-order)
1
1
00H
Data 19 (low-order)
1
1
00H
Error check
-
2
CRC (16 bits)
Total number of bytes
53
49
■ Example of slave response (with a start address of 1b58H and a data count of 20)
Component
Data length
Data
TCP RTU
MBAP header (only for Modbus TCP)
7
-
-
Slave address
-
1
-
Function code
1
1
10H
Data
Relative start address (high-order)
1
1
1bH
Relative start address (low-order)
1
1
58H
Write data count (high-order)
1
1
00H
Write data count (low-order)
1
1
14H
Error check
-
2
CRC (16 bits)
Total number of bytes
12
8