DVP-15MC Series Motion Controller Operation Manual 
A-6 
  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; 
} 
}