Error Checking Code; Description; Crc-16 Algorithm - GE 269Plus Instruction Manual

Motor management relay
Table of Contents

Advertisement

ERROR CHECKING CODE

a) DESCRIPTION
The error checking code mentioned previously is a standard cyclic redundancy check (CRC). The 269Plus
employs an ANSI CRC-16 scheme. This scheme considers the data stream as one large binary number. All
start, stop and parity bits are excluded from the CRC calculation.
The data stream is multiplied by x
2
x
+ 1, and is expressed as a 16-bit binary number (11000000000000101b). Only the 16-bit remainder of this
division is used as the CRC code. It is transmitted MSB first. The receiver calculates the CRC value for the
received data and compares this to the sender's CRC code. If the two CRC codes do not match, an error has
occurred. If an error is detected by the receiver, then the received command is not executed and the 269Plus
will not respond. If no errors are detected by the receiver, then the received command is executed.
b) CRC-16 ALGORITHM
The following algorithm describes the generation of the CRC code. Once the algorithm is complete, the work-
ing register "A" contains the CRC value to be transmitted (AL transmitted first, AH second). This algorithm
requires the characteristic polynomial to be reverse bit ordered. The MSbit of the characteristic polynomial is
4
dropped as it does not affect the value of the remainder. A few terms used in the algorithm are defined below:
-->
= data transfer
A
= a 16 bit working register
AL
= the low order byte of A
AH
= the high order byte of A
i & j
= loop counters
(+)
= logical exclusive OR operator
Di
= ith data byte (i = 0 to N - 1)
G
= 16 bit characteristic polynomial.
= 11000000000000101 normally
= 1010000000000001 with MSbit dropped, and bit order reversed. This reverse ordered, truncated
binary number is the value used throughout the algorithm.
Shr(x) = Shift right. The LSbit of low order byte of x shifts into carry and a '0' is shifted into MSbit of high
order byte of x , with the LSbit of the high order byte of x shifted into the MSbit of the low order
byte of x .
N
= number of data bytes to be processed.
The algorithm is shown below:
1) FFFF hex --> A
2) 0 --> i
3) 0 --> j
4) Di (+) AL --> AL
5) j + 1 --> j
6) shr(A)
7) is there a carry? NO: go to 8)
8) is j = 8?
9)
10)is i = N?
11)A --> CRC
4-
8
Courtesy of NationalSwitchgear.com
16
, then divided by a characteristic polynomial. This polynomial is x
YES: G (+) A --> A
YES: go to 9)
NO: go to 5)
i + 1 --> i
YES: go to 11)
NO: go to 3)
269Plus Motor Management Relay
4 COMMUNICATIONS
4.8 ERROR CHECKING CODE
16
+ x
GE Power Management
15
+

Advertisement

Table of Contents
loading

Table of Contents