GB
Slave to master (reply)
Slave
Command
address
code
(1 byte)
(0x04)
18.4.3 Command code = 0x06 (write a single holding register)
Master to slave:
Slave
Command
address
code
(1 byte)
(0x06)
Slave to master (reply):
Slave
Command
address
code
(1 byte)
(0x06)
18.4.4 Exception code
In case of error, the slave will only send one data byte (exception code)
0x01:Unsupported command.
0x02:The address of the holding register is out of range.
Total number
First
of data bytes
register
(1 byte)
data
Holding register
address (2 bytes, high
byte first)
Holding register
address (2 bytes, high
byte first)
159
. . . Nth register
CRC check
data
(2 bytes)
Holding register
Check CRC
address (2 bytes,
(2 bytes)
high byte first)
Write the value of
Check CRC
the register (2 bytes,
(2 bytes)
high byte first)