EasyManua.ls Logo

Estun ProNet-15D - Page 142

Estun ProNet-15D
216 pages
Print Icon
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...
ProNet Plus Series AC Servo User's Manual
- 140 -
ASCII mode:
Communication is ended with (0DH) - [carriage return] and (0AH) - [new line].
RTU mode:
When the time exceeds the sleep interval by at least 4 bytes transmission time while in the current communication speed,
it means the communication is finished.
Example:
The following example uses C language to generate CRC value. The function needs two parameters.
unsigned char * data;
unsigned char length;
The function will return unsigned integer type CRC value.
unsigned int crc_chk(unsigned char * data,unsigned char length){
int i,j;
unsigned int crc_reg=oxFFFF;
While(length- -){
crc_ reg ^=*data++;
for(j=0;j<8;j++){
If(crc_reg & 0x01){
crc_reg=( crc_reg >>1)^0xA001;
}else{
crc_regcrc_reg >>1;
}
}
}
return crc_reg;
}

Table of Contents

Related product manuals