237
(1).
The starting value of a 16-bit register value is FFFFH (all 16 bits equal 1).
(2).
Perform an exclusive OR of this value and the slave address. Then save the result in
the register.
(3).
Right shift the result, put 0 to the left of the high-order byte and check the CRC
register value.
(4).
If the value is 0, save the result from step (3) above in the CRC register.
If the value is not 0, perform an exclusive OR of the result from stop (3) and the value
A001h(1010 0000 0000 0001). Then save the result in the CRC register.
(5).
Repeat step (3) and (4) until 8-bit operations are all performed.
(6).
Repeat step (2) to (5). 8-bit command data until all the command data are caculated.
The result of the last shift is the CRC checksum. Send the low-order byte before the
high-order byte when sending the CRC checksum. For an example of CRC checksum
1241hex, the high-order byte of CRC-16 must be set to 41hex, and the low-order
byte must be set to 12hex.
CRC Calculation:
UWORD ch_sum ( UBYTE long , UBYTE *rxdbuff ) {
BYTE i = 0;
UWORD wkg = 0xFFFF;
while ( long-- ) {
wkg ^= +;
for ( i = 0 ; i < 8; i++ ) {
if ( wkg & 0x0001 ) {
wkg = ( wkg >> 1 ) ^ 0xa001;
}
else {
wkg = wkg >> 1;
}
}
}
return( wkg );
}
11.5.8 Response Message
Perform a CRC calculation on the response message according to the above description. The
result of the calculation should match the CRC checksum of the response message.
Содержание EVO 6800 Series
Страница 1: ...MANUAL Compact Vector Drive EVO 6800 Series...
Страница 33: ...33 34 2 36 0 2 8 93 0...
Страница 35: ...35 4 2 Main Circuit...
Страница 41: ...41 4 3 Control Circuit...
Страница 260: ...260 Above panel display value excluding the decimal point units please according to actual user unit conversion...