DVP-15MC Series Motion Controller Operation Manual
A-6
A
Response message:
Field name
Character
Start
No input data for more than 10ms
Communication address
01
Function code
03
Read data number
(
Counted by bytes
)
04
Read high byte of data content
00
Read low byte of data content
01
Read high byte of data content
00
Read low byte of data content
02
Low byte of CRC check sum
2A
High byte of CRC check sum
32
End
No input data for more than 10ms
CRC check (check sum)
CRC check starts from “Communication address” to the last “Data content”. The calculation
method is shown below.
Step 1:
Download a 16-bit hex register (CRC register) with the content value FFFF.
Step 2:
Make the XOR operation between the 8-bit data of the first byte in the command and
the 8-bit data of the low byte in CRC register and then store the operation result in CRC register.
Step 3:
Move the content value of CRC register by one bit towards the right and fill 0 in the
highest bit.
Step 4:
Check the value of the lowest bit in CRC register. If the value is 0, repeat the action of
step 3; if 1, make XOR operation between the content in CRC register and hex. A001 and then
store the result in CRC register.
Step 5:
Repeat step 3 and step 4 till the content in CRC register is moved by 8 bits towards the
right. At this moment, the processing of the first byte of the command message is finished.
Step 6:
Repeat the action of step 2 to step 5 for the next byte in the command message till the
processing of all bytes is finished. The last content in CRC register is CRC check value. When
CRC check value in command message is transmitted, the high and low bytes in calculated
CRC check value must exchange with each other, i.e. the low byte is transmitted first.
Example on calculation of CRC check value with C language
unsigned char* data
//
Pointer of command message content
unsigned char length
//
Length of command message content
unsigned int crc_chk
(
unsigned char* data, unsigned char length
)
{
int j;
unsigned int reg_crc=0Xffff;
while
(
length--
)
{
reg_crc ^= *data++;
for
(
j=0;j<8;j++
)
{
If
(
reg_crc & 0x01
)
reg_crc=
(
reg_crc>>1
)
^ 0Xa001; /* LSB
(
b0
)
=1 */
else reg_crc=reg_crc >>1;
}
}
Содержание DVP-15MC Series
Страница 16: ...1 1 1 Preface Table of Contents 1 1 Explanation of Symbols in This Manual 1 2 1 2 Revision History 1 3...
Страница 19: ...DVP 15MC Series Motion Controller Operation Manual 1 4 _1 MEMO...
Страница 20: ...2 1 2 Overview Table of Contents 2 1 Product Description 2 2 2 2 Functions 2 2 2 3 Profile and Components 2 3...
Страница 23: ...DVP 15MC Series Operation Manual 2 4 _2 MEMO...
Страница 31: ...DVP 15MC Series Motion Controller Operation Manual 3 8 _3 MEMO...
Страница 75: ...DVP 15MC Series Motion Controller Operation Manual 6 26 _6 MEMO...
Страница 87: ...DVP 15MC Series Motion Controller Operation Manual 7 12 _7 MEMO...
Страница 432: ...Chapter 8 Logic Instructions 8 345 8_ MEMO...
Страница 433: ...9 1 9 Chapter 9 Introductions of Axis Parameters Table of Contents 9 1 Description of Axis Parameters 9 2...
Страница 470: ...DVP 15MC Series Motion Controller Operation Manual 10 34 10 MEMO...
Страница 878: ...DVP 15MC Series Motion Controller Operation Manual 11 408 11 1 MEMO...
Страница 920: ...DVP 15MC Series Motion Controller Operation Manual A 16 A MEMO...
Страница 941: ...D 1 D Explanation of Homing Modes Table of Contents D 1 Explanation of Homing Modes D 2...
Страница 966: ...DVP 15MC Series Motion Controller Operation Manual D 26 D MEMO...