User Manual For RS485-ZDM556C Stepper Drive
Office Add. : C-83, Zaveri Industrial Estate, Kathwada – Singarva Road, Kathwada, Ahmedabad-382430.
Email :
,Website :
www.zenexautomation.net
Contact (M) : +91 – 9727764623 / +91 - 9978030413
2.5 CRC Verification Example
The example take C language to calculate CRC
Uint16 Funct_CRC16(unsigned char * puchMsg, Uint16 DataLen)
{
Uint16 i,j,tmp;
Uint16 crcdata=0xFFFF;
for(i=0;i<DataLen;i++)
{
crcdata=(*puchMsg)^crcdata;
+;
for(j=0;j<8;j++)
{
tmp=crcdata&0x0001;
crcdata=crcdata>>1;
if(tmp){
crcdata=crcdata^0xA001;
}
}
}
returncrcdata;
}
2.6 Communication error code
The following four situations may occur during communication:
1, communication is normal, the drive can normally receive and return information.
2, the drive due to communication error, can not normally receive the host's information, at this time the host
will be in overtime processing.