YASKAWA GPD 515/G5 Modbus RTU Technical Manual page 35

Hide thumbs Also See for GPD 515/G5 Modbus RTU:
Table of Contents

Advertisement

CRC-16 Calculation Example:
A two byte message for a read-out of a
specified coil status is as follows.
Slave Address = 2
0000 0010
0000 0111
Function Code = 7
The actual CRC calculation would look like
this:
CRCTMP
FLAG
1111 1111 1111 1111
0000 0010
1111 1111 1111 1101
OR
0111 1111 1111 1110
1010 0000 0000 0001
constant A001h
1101 1111 1111 1111
OR
0110 1111 1111 1111
1010 0000 0000 0001
constant A001h
1100 1111 1111 1110
OR
0110 0111 1111 1111
0011 0011 1111 1111
1010 0000 0000 0001
constant A001h
1001 0011 1111 1110
OR
0100 1001 1111 1111
0010 0100 1111 1111
1010 0000 0000 0001
constant A001h
1000 0100 1111 1110
OR
0100 0100 0111 1111
0010 0001 0011 1111
1010 0000 0000 0001
1000 0001 0011 1110
OR
0000 0111
1000 0001 0011 1001
OR
0100 0000 1001 1100
1010 0000 0000 0001
constant A001h
1110 0000 1001 1101
OR
0111 0000 0100 1110
1010 0000 0000 0001
constant A001h
1101 0000 0100 1111
OR
0110 1000 0010 0111
1010 0000 0000 0001
constant A001h
1100 1000 0010 0110
OR
0110 0100 0001 0011
Initial Value
Slave Address
Result of EX
1
Shift #1
CRC-16
Result of EX
1
Shift #2
CRC-16
Result of EX
0
Shift #3
1
Shift #4
CRC-16
Result of EX
0
Shift #5
1
Shift #6
CRC-16
Result of EX
0
Shift #7
1
Shift #8
CRC-16 constant A001h
Result of EX
Function Code
Result of EX
1
Shift #1
CRC-16
Result of EX
1
Shift #2
CRC-16
Result of EX
1
Shift #3
CRC-16
Result of EX
0
Shift #4
0011 0010 0000 1001
1010 0000 0000 0001
constant A001h
1001 0010 0000 1000
OR
0100 1001 0000 0100
0010 0100 1000 0010
0001 0010|0100 0001
1
2
4
1
CRC-16
CRC-16
(Upper 8)
(Lower 8)
The Message Format
1
Shift #5
CRC-16
Result of EX
0
Shift#6
0
Shift #7
0
Shift #8
6-15

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents