28/39
7.Communication protocol(modbus)
7.1.General design of Instructions
71.1 Overall design: Read data frame structure (request), 8 length as an example
constituent part
Numerical
value
(16-system) Examples
Description
Address bit
01
1 byte
Instruction code
03
Indicates the type of instruction,1 byte
Address
00 00
2 bytes, Parameter address
Data Address length 00 08
Number of request parameters (N=8)
Checkout bit
CRC
2 bytes (low and high): polynomial
A001
Back to data frame structure (return)
constituent part
Numerical
value(16
hexadecimal)Examples
Description
Address bit
01
1 byte
Instruction code
03
Indicates the type of instruction,
1 byte
Data length
10
Number of data (N=16byte)
Data body
16 bytes
Checkout bit
CRC
2 bytes (low
and high):
polynomial A001
Adaptation to the USB protocol
If USB communication is made, 64 bytes of data are transmitted at one request.If the
instruction length is less than 64 bytes, the subsequent complement is 00 until 64 bytes
are replenished.
7.2 Time instruction (set command with 10)
7.2.1 Setting time
constituent part
Numerical value
Address bit
01
Instruction code
10
Starting address
c0 00
Address length
00 04
Data length
08
Data body
(
8
个
byte
)
Year, month, day, hour, minute, second,BCD encoding,
two bytes per year, and the remaining 1 bytes.
Checkout bit
2 bytes CRC
Examples
01 10 c 0 00 00 04 08 20 18 05 25 18 37 21 00 CRC