EasyManua.ls Logo

Mitsubishi Electric MELSEC iQ-RJ71C24-R4 - Page 9

Mitsubishi Electric MELSEC iQ-RJ71C24-R4
60 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
1 FRAME SPECIFICATIONS
1.1 MODBUS Protocol Frame Specifications
7
1
4. If the least significant bit of the step 2 is '1', calculate the exclusive OR (XOR) from the result of step 3 and the generator
polynomial (A001H).
If the least significant bit is '0', do not calculate the exclusive OR (XOR), but shift it by 1 bit to the right.
5. Repeat the step 3 and 4 until the bit is shifted up to 8 times.
6. Calculate the exclusive OR (XOR) from the result of step 5 and the next 8 bits of the frame.
7. Repeat the step 3 to 6.
8. Repeat the above operations until the end of the data unit is reached. The final value is a calculated CRC value.
9. The CRC value is stored in the frame in the order of lower 8 bits to upper 8 bits.
Ex.
The following is a calculation example in the case where function code 07H is sent to station No.2.
Error check range is as follows:
• Address field (1 byte): 02H
• Function code (1 byte): 07H
• Data (0 bytes)
CRC error checking procedure 16-bit register (MSB) Flag
*1
1 Load the 16-bit register whose bits are all '1'. 16-bit register whose bits are all '1'. 1111 1111 1111 1111 
2 Calculate the exclusive OR (XOR) from the first 8 bits of the
frame and the bits in the above.
Address field (02H)  0000 0010
Exclusive OR ( XOR) 1111 1111 1111 1101
3 Shift by 1 bit to the right. Shift 1 0111 1111 1111 1110 1
4 Since the flag is '1', calculate the exclusive OR (XOR) from the
result in 'Shift 1' and generator polynomial (A001H).
Generator polynomial (A001H) 1010 0000 0000 0001
Exclusive OR ( XOR) 1101 1111 1111 1111
5 Shift by 1 bit to the right. Shift 2 0110 1111 1111 1111 1
Since the flag is '1', calculate the exclusive OR (XOR) from the
result in 'Shift 2' and generator polynomial (A001H).
Generator polynomial (A001H) 1010 0000 0000 0001
Exclusive OR ( XOR) 1100 1111 1111 1110
Shift by 1 bit to the right. Shift 3 0110 0111 1111 1111 0
Shift by 1 bit to the right. Shift 4 0011 0011 1111 1111 1
Since the flag is '1', calculate the exclusive OR (XOR) from the
result in 'Shift 4' and generator polynomial (A001H).
Generator polynomial (A001H) 1010 0000 0000 0001
Exclusive OR ( XOR) 1001 0011 1111 1110
Shift by 1 bit to the right. Shift 5 0100 100 1 1111 1111 0
Shift by 1 bit to the right. Shift 6 0010 010 0 1111 1111 1
Since the flag is '1', calculate the exclusive OR (XOR) from the
result in 'Shift 6' and generator polynomial (A001H).
Generator polynomial (A001H) 1010 0000 0000 0001
Exclusive OR ( XOR) 1000 010 0 1111 1110
Shift by 1 bit to the right. Shift 7 0100 001 0 0111 1111 0
Shift by 1 bit to the right. Shift 8 0010 0001 0011 1111 1
Since the flag is '1', calculate the exclusive OR (XOR) from the
result in 'Shift 8' and generator polynomial (A001H).
Generator polynomial (A001H) 1010 0000 0000 0001
Exclusive OR (XOR) 1000 0001 0011 1110
6 Calculate the exclusive OR (XOR) from the next 8 bits of the
frame and the bits in the above.
Function code (07H)  0000 0111 
Exclusive OR (XOR) 1000 0001 0011 1001

Table of Contents

Other manuals for Mitsubishi Electric MELSEC iQ-RJ71C24-R4

Related product manuals