![Aquaread BlackBox Скачать руководство пользователя страница 70](http://html.mh-extra.com/html/aquaread/blackbox/blackbox_instruction-manual_2960649070.webp)
Aquaread BlackBox™ Instruction Manual
10401-00618 Rev P
9.5.1. Slave Address
The BlackBox stores a Modbus slave address in its EEPROM. The sensor address is a
single byte value in the range 1-247. The BlackBox will only process and respond to
unicast commands if the slave address in the command matches the BlackBox's slave
address.
The BlackBox's slave address is set to 1 during production. If the BlackBox receives a
command that writes to holding register 1, and the value written is in the range 1-247, the
new address will replace the slave address in EEPROM and the BlackBox will only respond
to subsequent unicast commands sent to that new address.
If the value written is not in the range 1-247, then the sensor address will not be changed.
Note also that the slave address in the response to the command that wrote the new
address will be the original slave address, not the new one.
9.5.2. Serial Communication Speed
The BlackBox stores the baud rate used for Modbus communications in its EEPROM. The
serial communication speed is set to 19200 during production. If the BlackBox receives a
command that writes to holding register 3, and the value written is 1200, 2400, 4800, 9600,
19200, 38400 or 57600, the new speed will replace the old speed in EEPROM and the
BlackBox will switch over to the new speed immediately after responding to the command.
9.5.3. Serial Communication Parity
The BlackBox stores the parity type used for Modbus communications in its EEPROM. The
serial parity is set to even during production. If the BlackBox receives a command that
writes to holding register 4, and the value written is 0 (none), 2 (even) or 3 (odd), the new
parity type will replace the old parity type in EEPROM and the BlackBox will switch over to
the new parity type immediately after responding to the command.
9.5.4. Input Registers
The input registers hold the measurements read from the probe.
9.6. Cyclic Redundancy Check
The cyclic redundancy check is calculated on the entire contents of the packet, starting with
the slave address and ending with the last byte before the start of the CRC field.
The CRC field is composed of the two bytes of the CRC value, least significant byte first,
most significant byte second. (Note that this is the opposite order to multi-byte values in the
<data> field of the packet.)
The algorithm for calculating the CRC is as follows:
Set crc = 0xFFFF
For each message character c:
Set crc = crc XOR c
Repeat 8 times:
If least significant bit of crc is 1,
Shift crc right by one bit
Set crc = crc XOR 0xA001
Otherwise,
Shift crc right by one bit
© 2019 Aquaread Ltd.
www.aquaread.com
Page 70 of 71