140
COMMISSIONING MANUAL
POWERDRIVE MD
Variable speed drive
OPERATION WITH MODBUS RTU
LEROY-SOMER
3871 en - 2011.05 / h
6.4.9 - CRC
This check word is used to detect transmission errors. It is calculated over 16 bits from all the bytes in the question and response
frames.
Algorithm:
START
CRC = 0xFFFF
Number of bytes processed = 0
Next byte = first byte
REPEAT
{
Byte to be processed = next byte;
CRC = CRC XOR byte to be
processed
REPEAT eight times
{
IF (CRC odd) then
CRC = CRC/2 XOR
0xA001
else
CRC = CRC/2
}
Number of bytes processed = Number of
bytes processed + 1
}
WHILE(Number of bytes processed d
Number of bytes to be processed)
END.