7. MODBUS
IMS01J02-E2
116
7.2.2 Preset single register [06H]
The query message specifies data to be written into the designated holding register. The write data is
arranged in the query message with high-order 8-bit first and low-order 8-bit next. Only R/W holding
registers can be specified.
Example: Data is written into the holding register 00C8H of slave address 1.
Query message
Slave address
01H
Function code
06H
Holding register
High
00H
number Low
C8H
Write data
High
00H
Low
64H
CRC-16 High
09H
Low
DFH
Normal response message
Slave address
01H
Function code
06H
Holding register
High
00H
number
Low
C8H
Write data
High
00H
Low
64H
CRC-16 High
09H
Low
DFH
Error response message
Slave address
01H
80H
+
Function code
86H
Error code
03H
CRC-16 High
02H
Low
61H
Contents will be the same as query message data
Any data within the range