Crc Checking - Omega i-SERIES User Manual

Monitor / controller
Hide thumbs Also See for i-SERIES:
Table of Contents

Advertisement

6.6 CRC Checking

With RTU Mode the error checking field contains a 16-bit value implemented as two
eight-bit bytes (High order byte and Low order byte). The error check value is the result
of a Cyclical Redundancy Check (CRC) Calculation performed on the message contents.
After building a message (address, function code, data) the transmitting device
calculates a CRC Code and puts it to the end of the message. A receiving device will
calculate a CRC Code from the message it has received and compare against
transmitted CRC Code. If these CRC Codes are different, there has been a
communication error. i-Series devices will not reply if they detect a CRC Error.
Sequences of CRC calculation:
1. Load a 16 bit CRC register with all 1's.
2. Apply first 8 bit byte of the message to the low order byte (LB) of the contents of the
register.
3. Exclusive OR these 8 bit with the register contents.
4. Shift the result one bit to the right with zero entering into the high order byte (HB)
position and evaluate the LB.
5. If over flow bit in LB is 1, exclusive OR the latest register contents with A001 Hex
value.
6. If over flow bit in LB is 0, no exclusive OR occurs (repeat step 4).
7. Repeat steps 4, 5 and 6 until 8 shifts have been performed.
8. Apply next 8 bit byte of the message to the LB contents of the register.
9. Exclusive OR these 8 bit with the register contents.
10. Repeat steps 4 to 9 until all bytes of the message have been processed.
11. The final content of the register is the CRC value.
Examples of CRC calculation sees in Appendix B
When CRC is placed into the end of the message, the low order byte of the CRC
will be transmitted first, followed by the High order byte.
36

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents