PACSystems™ RX3i and RSTi-EP CPU Reference Manual Section 6
GFK-2222AK October 2019
Serial I/O, SNP & RTU Protocols 169
6.3.2.4 Calculating the Length of Frame
To generate the CRC-16 for any message, the message length must be known. The length
for all types of messages can be determined from the table below.
6.3.2.5 RTU Message Length
Query or Broadcast Message Length
Less CRC Code
Response Message Length
Less CRC Code
Preset Multiple
Registers
The receiver processes incoming data through the same CRC algorithm as the transmitter. The example for the receiver starts at the point
after all the data bits but not the transmitted CRC have been received correctly. Therefore, the receiver CRC should be equal to the transmitted
CRC at this point. When this occurs, the output of the CRC algorithm will be zero indicating that the transmission is correct.
The transmitted message with CRC would then be:
The MSB and LSB references are to the data bytes only, not to the CRC bytes. The CRC MSB and LSB order are the reverse of the data byte
order.
The value of this byte is the number of bytes contained in the data being transmitted.