TECO A510s Series Instruction Manual page 478

Hide thumbs Also See for A510s Series:
Table of Contents

Advertisement

CRC calculate program (C language):
UWORD ch_sum (UBYTE long, UBYTE *rxdbuff )
{
BYTE i = 0;
UWORD wkg = 0xFFFF;
while ( long-- ) {
wkg ^= rxdbuff++;
for ( i = 0 ; i < 8; i++ ) {
if ( wkg & 0x0001 ) {
wkg = ( wkg >> 1 ) ^ 0xa001;
}
else {
wkg = wkg >> 1;
}
}
}
return( wkg );
}
Address
During a communication error the drive will response with an Exception Code and send a
message back to the main system consisting of a Function Code that is "ANDED (and 80h)" with
80 Hex.
01
02
03
04
':'
Node Address
'0'
Function
'1'
Exception code
'8'
CRC-16
'6'
'5'
'1'
'2'
'8'
'CR'
'LF'
Content
Function code error
Register number error
DATA setting error
Register number is over 32
83H
52H
High
C0H
Low
CDH
4-388

Advertisement

Table of Contents
loading

Table of Contents