YASKAWA CIMR-DC4A0040AAA Technical Manual page 202

Power regenerative converter
Hide thumbs Also See for CIMR-DC4A0040AAA:
Table of Contents

Advertisement

C.7 Message Format
◆ Error Check
The converter uses a CRC-16 (cyclic redundancy check, checksum method) for checking data validity. Use the procedure
described below when calculating the CRC-16 checksum for command data or when verifying response data.
Command Data
When the converter receives data, it calculates the CRC-16 checksum from the data and compares it to the CRC-16 value
received within the message. Both must match before a command is processed.
An initial value of FFFFH (i.e., all 16 bits equal 1) must be used for CRC-16 calculations in the MEMOBUS/Modbus
protocol.
Calculate the CRC-16 checksum using the following steps:
1.
The starting value is FFFFH.
2.
Perform an XOR operation of this value and the slave address.
3.
Right shift the result.
4.
When the overflow bit of the shift operation becomes 1, perform an XOR operation of the result from step 3
above and the fix value A001H.
5.
Repeat steps 3 and 4 until eight shift operations have been performed.
6.
After eight shift operations, perform an XOR operation with the result and the next data in the message (function
code, register address, data). Continue with steps 3 to 5 until the last data has been processed.
7.
The result of the last shift or XOR operation is the checksum.
The example in
Table C.4
the result D140H.
Note: This example does not show the calculation for a complete MEMOBUS/Modbus command. Normally data would follow in the
calculation.
Description
Initial Value (FFFFH)
Address 02H
XOR w initial value
Shift 1
XOR w A001H
XOR result
Shift 2
XOR w A001H
XOR result
Shift 3
Shift 4
XOR w A001H
XOR result
Shift 5
Shift 6
XOR w A001H
XOR result
Shift 7
Shift 8
XOR w A001H
XOR result
Perform operations with next data (function code)
Response Data
Perform a CRC-16 calculation on the response message data as described above as a validation check. The result should
match the CRC-16 checksum received within the response message.
202
shows the CRC-16 calculation of the slave address 02H and the function code 03H, yielding
Table C.4 CRC-16 Checksum Calculation Example
Calculation
1111 1111 1111 1111
0000 0010
1111 1111 1111 1101
0111 1111 1111 1110
1010 0000 0000 0001
1101 1111 1111 1111
0110 1111 1111 1111
1010 0000 0000 0001
1100 1111 1111 1110
0110 0111 1111 1111
0011 0011 1111 1111
1010 0000 0000 0001
1001 0011 1111 1110
0100 1001 1111 1111
0010 0100 1111 1111
1010 0000 0000 0001
1000 0100 1111 1110
0100 0010 0111 1111
0010 0001 0011 1111
1010 0000 0000 0001
1000 0001 0011 1110
YASKAWA ELECTRIC SIEP C710656 06F YASKAWA Power Regenerative Converter - D1000 Technical Manual
Overflow
Description
Function Code 03H
XOR w result
Shift 1
1
XOR w A001H
XOR result
Shift 2
1
XOR w A001H
XOR result
Shift 3
0
Shift 4
1
XOR w A001H
XOR result
Shift 5
0
Shift 6
1
XOR w A001H
XOR result
Shift 7
0
XOR w A001H
1
XOR result
Shift 8
XOR w A001H
XOR result
CRC-16
Calculation
1000 0001 0011 1101
0100 0000 1001 1110
1010 0000 0000 0001
1110 0000 1001 1111
0111 0000 0100 1111
1010 0000 0000 0001
1101 0000 0100 1110
0110 1000 0010 0111
0011 0100 0001 0011
1010 0000 0000 0001
1001 0100 0001 0010
0100 1010 0000 1001
0010 0101 0000 0100
1010 0000 0000 0001
1000 0101 0000 0101
0100 0010 1000 0010
1010 0000 0000 0001
1110 0010 1000 0011
0111 0001 0100 0001
1010 0000 0000 0001
1101 0001 0100 0000
1101 0001 0100 0000
D
1
Lower
Continue from here with next data.
Overflow
0000 0011
1
1
0
1
0
1
1
1
4
0
Upper

Advertisement

Table of Contents
loading

Table of Contents