Specifications

76
Schneider Electric
The Modbus Protocol (continued)
Example of CRC calculation: frame 020B = read event counter (function 11) of the
slave at 02h.
Thus the CRC for this frame is: 4117 hex.
MSB = Most Significant Bytes.
LSB = Least Significant Bytes.
Initialisation of
the CRC
CRC = 1111 1111 1111 1111
+1st byte (02) CRC = 0000 0000 0000 0010
n = 0
+ polynomial
CRC =
Shift N°1
1111
0111
1010
1111
1111
0000
1111
1111
0000
1101
1110_ 1
0001
n = 1
+ polynomial
CRC =
Shift N°2
1101
0110
1010
1111
1111
0000
1111
1111
0000
111
1111_ 1
0001
n = 2
n = 3
+ polynomial
CRC =
Shift N°3
Shift N°4
1100
0110
0011
1010
1111
0111
0011
0000
1111
1111
1111
0000
1110
1110_ 0
1111_ 1
0001
n = 4
n = 5
+ polynomial
CRC =
Shift N°5
Shift N°6
1001
0100
0010
1010
0011
1001
0100
0000
1111
1111
1111
0000
1110
1111_ 0
1111_ 1
0001
n = 6
n = 7
n > 7
C
CRC = + 2nd
byte (
φ
B)
+ polynomial
CRC =
Shift N°7
Shift N°8
CRC =
1000
0100
0010
1010
1000
0000
0100
0010
0001
0000
0001
0000
1111
0111
0011
0000
0011
0000
1110
1111_ 0
1111_ 1
0001
1110
1011
n = 0
+ polynomial
CRC =
Shift N°1
1000
0100
1010
0001
0000
0000
0011
1001
0000
0101
1010_ 1
0001
n = 1
+ polynomial
CRC =
Shift N°2
1110
0111
1010
0000
0000
0000
1001
0100
0000
1011
1101_ 1
0001
n = 2
n = 3
n = 4
+ polynomial
CRC =
Shift N°3
Shift N°4
Shift N°5
1101
0110
0011
0001
1010
0000
1000
0
100
1010
0000
0100
0010
0001
0000
0000
1100
0110_ 0
0011_ 0
1001_ 1
0001
n = 5
n = 6
n = 7
CRC =
Shift N°6
Shift N°7
Shift N°8
Final CRC
1011
0101
0010
0001
1
MSB
1010
1101
1110
0111
7
0000
0000
1000
0100
4
LSB
1000
0100_ 0
0010_ 0
0001_ 0
1
Guide to Integration
Modbus / Jbus