Modbus/en: различия между версиями

Новая страница: «For the Modbus RTU Protocol, the 16-bit checksum (CRC) is calculated using the algorithm described in the [http://www.modbus.org/specs.php Modbus] specification…»
(Новая страница: «=== Modbus checksum calculation ===»)
(Новая страница: «For the Modbus RTU Protocol, the 16-bit checksum (CRC) is calculated using the algorithm described in the [http://www.modbus.org/specs.php Modbus] specification…»)
Строка 233: Строка 233:
=== Modbus checksum calculation  ===
=== Modbus checksum calculation  ===


Для протокола Modbus RTU 16-битная контрольная сумма (CRC) вычисляется по алгоритму, описанному в [http://www.modbus.org/specs.php спецификации Modbus], в документе "Modbus Serial Line Protocol and Implementation Guide", раздел "CRC-generation". Передающее устройство формирует два байта контрольной суммы на основе данных сообщения, а принимающее устройство заново вычисляет контрольную сумму и сравнивает с полученной. Совпадение принятой и вычисленной контрольной суммы Modbud RTU считается индикатором успешного обмена данными.
For the Modbus RTU Protocol, the 16-bit checksum (CRC) is calculated using the algorithm described in the [http://www.modbus.org/specs.php Modbus] specification in ''the Modbus Serial Line Protocol and Implementation Guide, CRC-generation section''. The sending device generates two bytes of checksum based on the message data, and the receiving device recalculates the checksum and compares it with the received one. The coincidence of the accepted and calculated modbud RTU checksum is considered an indicator of successful data exchange.


В случае ограниченных вычислительных ресурсов для вычисления контрольной суммы существует функция, использующая табличные значения (так же приведена в спецификации).
В случае ограниченных вычислительных ресурсов для вычисления контрольной суммы существует функция, использующая табличные значения (так же приведена в спецификации).
12 063

правки