3 write multiple registers (0x10), Write multiple registers (0x10) – Hamilton Sundstrand Company Fuel Metering Valves XVG User Manual
Page 9
Example: Request to write 0x03 to register 2.
Request Response
01 06 00 01 00 03 98 0B
01 06 00 01 00 03 98 0B
Function 06
Function 06
Register Address Hi 00
Register Address Hi 00
Register Address Lo 01
Register Address Lo 01
Register Value Hi 00
Register Value Hi 00
Register Value Lo 03
Register Value Lo 03
CRC 98 0B
CRC 98 0B
Table 9: Modbus Function 06 – Example
7.4.3 Write Multiple Registers (0x10)
Request message:
SLAVE ADDRESS + FUNCTION CODE + STARTING ADDRESS + QUANTITY
OF REGISTERS + BYTES COUNT + REGISTERS VALUES + CRC
Request
Length Valid
Value
Slave Address
1 Byte
0 to 247
Function code
1 Byte
0x10
Starting Address
2 Bytes
0x0000 to 0xFFFF
Quantity of Registers
2 Bytes
1 to 123 (0x7B)
Bytes count
1 Byte
2xN
Registers Values
2xN Bytes
value
CRC 2
Bytes
0x0000 to 0xFFFF
*N = Quantity of Registers
Table 10: Modbus Function 16 - Request Message
Response message:
SLAVE ADDRESS + FUNCTION CODE + STARTING ADDRESS + QUANTITY
OF REGISTERS + CRC
Response
Length Valid
Value
Slave Address
1 Byte
0 to 247
Function code
1 Byte
0x10
Starting Address
2 Bytes
0x0000 to 0xFFFF
Quantity of Registers
2 Bytes
1 to 123 (0x7B)
CRC 2
Bytes
0x0000 to 0xFFFF
Table 11: Modbus Function 16 - Response Message
Example: Write 0x0A and 0x0102 to two registers, starting at register 2.
Request Response
01 10 00 01 00 02 04 00 0A 01 02 92 30
01 10 00 01 00 02 10 08
Function 10
Function 10
9