![Aquaread BlackBox Instruction Manual Download Page 66](http://html.mh-extra.com/html/aquaread/blackbox/blackbox_instruction-manual_2960649066.webp)
Aquaread BlackBox™ Instruction Manual
10401-00618 Rev P
If the above checks succeed, the BlackBox will send a response with the format:
Field
Size
Content
<a>
1 byte
Slave address
<function-code>
1 byte
0x04
<values-size>
1 byte
Size in bytes of <values> field (equal to 2 x <nr-registers>)
<values>
<values-size>
bytes
Block of data containing the values of the requested registers, 2
bytes per register, in order of increasing address from <start-
address> onwards
<crc>
2 bytes
CRC
9.4.4. Write Holding Register
This command writes a value to a single Modbus holding register and has the format:
Field
Size
Content
<a>
1 byte
Slave address
<function-code>
1 byte
0x06
<address>
2 bytes
Address of the register to be written (0x0000-0xFFFF)
<value>
2 bytes
Value to be written to the register (0x0000-0xFFFF)
<crc>
2 bytes
CRC
NOTE: The address in the <start-address> field is the register number – 1.
On reception of this command, the BlackBox will check that <address> refers to a valid
holding register. If not, then the BlackBox will return an exception response with exception
type 2.
If the above check succeeds, the BlackBox will set the register to the specified value and
echo the received command packet as its response.
9.4.5. Write Holding Registers
This command writes a set of values to a contiguous block of Modbus holding registers
and has the format:
Field
Size
Content
<a>
1 byte
Slave address
<function-code>
1 byte
0x10
<start-address>
2 bytes
Base address of the block of registers to be written
(0x0000-0xFFFF)
<nr-registers>
2 bytes
The number of registers to be written (0x0001-0x007B)
<values-size>
1 byte
Size in bytes of <values> field (equal to 2 x <nr-registers>)
<values>
<values-size>
bytes
Block of data containing the values to be written to the
registers, 2 bytes per register, in order of increasing
address from <start-address> onwards
<crc>
2 bytes
CRC
NOTE: The address in the <start-address> field is the register number – 1.
On reception of this command, the BlackBox will check that <nr-registers> is greater than
zero and less than or equal to 0x7B. If this range check fails, the BlackBox will return an
exception response with exception type 3.
If the above range check succeeds, the BlackBox will check that all addresses in the
specified block refer to valid holding registers. If not, then the BlackBox will return an
exception response with exception type 2.
© 2019 Aquaread Ltd.
www.aquaread.com
Page 66 of 71