EasyManua.ls Logo

Delta MH300 Series - Page 1019

Delta MH300 Series
1030 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Appendix A. Modbus Protocol
MS300
A-8
{
int j;
unsigned int reg_crc=0xffff;
while(length--){
reg_crc ^= *data++;
for(j=0;j<8;j++){
if(reg_crc & 0x01){ /* LSB(b0)=1 */
reg_crc=(reg_crc>>1) ^ 0xa001;
}else{
reg_crc=reg_crc >>1;
}
}
}
return reg_crc; // return register CRC
}

Table of Contents

Related product manuals