![background image](http://html1.mh-extra.com/html/parker/6513/6513_technical-manual_3790390038.webp)
MODBUS
31
RS485/RS232 Communications Interface
The CRC code is formed by the following steps:
1.
Load a 16-bit CRC register with FFFFh.
2.
Exclusive OR ( ) the first 8-bit byte of the message with the high order byte of the CRC
register. Return the result to the CRC register.
3.
Shift the CRC register one bit to the right.
4.
If the overflow bit (or flag) is 1, exclusive OR the CRC register with A001 hex and return
the result to the CRC register.
5.
Repeat steps 3 & 4 seven times (8 in total).
6.
Exclusive OR the next 8-bit byte of the message with the high order byte of the CRC
register.
7.
Repeat step 3 through 6 until all bytes of the message have been exclusive OR’d with the
CRC register and shifted 8 times.
8.
The contents of the CRC register are the 2 byte CRC error code and are added to the
message with the most significant bits first.
The flow chart below illustrates this CRC error check algorithm.
START
FFFFh CRC
Register
CRC Register
next byte of the message
CRC Register
0
n
Shift CRC Register right 1 bit
Overflow?
NO
YES
CRC Register
A001h
CRC Register
n + 1
n
NO
n > 7?
YES
NO
YES
message
END
complete?
Is
Summary of Contents for 6513
Page 7: ......