App. - 53 App. - 53
APPENDIXES
The following show the example of 16-bit CRC (for MODBUS) calculation.
Packet example:
Station No.
Function code
16-bit CRC
02
H
07
H
41
H
12
H
Procedure example of 16-bit CRC (for MODBUS) of a packet example above:
CRC error checking procedure
16-bit register (MSB)
Flag
Calculating
procedure
(Load a 16-bit register whose bits are all '1')
1111 1111 1111 1111
02
H
(Station number)
0000
0010
Exclusive OR (XOR)
1111 1111 1111 1101
1) to 2)
Shift
1
0111 1111 1111 1110 1
Generator
polynomial
1010 0000 0000 0001
Exclusive OR (XOR)
1101
1111
1111
1111
3) to 4)
Shift
2
0110 1111 1111 1111 1
Generator
polynomial
1010 0000 0000 0001
Exclusive OR (XOR)
1100
1111
1111
1110
Shift
3
0110 0111 1111 1111 0
Shift
4
0011 0011 1111 1111 1
Generator
polynomial
1010 0000 0000 0001
Exclusive OR (XOR)
1001
0011
1111
1110
Shift
5
0100 1001 1111 1111 0
Shift
6
0010 0100 1111 1111 1
Generator
polynomial
1010 0000 0000 0001
Exclusive OR (XOR)
1000
0100
1111
1110
Shift
7
0100 0010 0111 1111 0
Shift
8
0010 0001 0011 1111 1
Generator
polynomial
1010 0000 0000 0001
Exclusive OR (XOR)
1000
0001
0011
1110
5)
07
H
(Function code)
0000
0111
Exclusive OR (XOR)
1000
0001
0011
1001
6)
Shift
1
0100 0000 1001 1100 1
Generator
polynomial
1010 0000 0000 0001
Exclusive OR (XOR)
1110
0000
1001
1101
Shift
2
0111 0000 0100 1110 1
Generator
polynomial
1010 0000 0000 0001
Exclusive OR (XOR)
1101
0000
0100
1111
Shift
3
0110 1000 0010 0111 1
Generator
polynomial
1010 0000 0000 0001
Exclusive OR (XOR)
1100
1000
0010
0110
Shift
4
0110 0100 0001 0011 0
Shift
5
0011 0010 0000 1001 1
Generator
polynomial
1010 0000 0000 0001
Exclusive OR (XOR)
1001
0010
0000
1000
Shift
6
0100 1001 0000 0100 0
Shift
7
0010 0100 1000 0010 0
Shift
8
0001 0010 0100 0001 0
7)
CRC value
12
H
41
H
8)
Summary of Contents for MELSEC LJ71C24
Page 1: ......
Page 2: ......
Page 18: ...A 16 A 16 INDEX REVISIONS WARRANTY...
Page 22: ...A 20 A 20 2 LJ71C24 R2 LJ71C24 R2 Before Using the Product...
Page 23: ...A 21 A 21 MEMO...
Page 38: ...4 2 4 2 4 PROCEDURES PRIOR TO OPERATION MEMO 4...
Page 105: ...7 30 7 30 7 SETTINGS FOR THE C24 MEMO...
Page 425: ......
Page 426: ......
Page 427: ......