MODBUS Protocol 97
Objection code indicates error category:
Objection code
Corresponding error
01
Illegal function code
02
Illegal data address
03
Overhanging data
04
Invalid operation of slave machine
20
Too much read-write parameters
21
Reserve read-write, implicit parameter
22
Slave machine running forbids modifying data
23
Data modification is protected by password
24
Failure in read-write parameter
CRC CHECK:
CRC CHECK
Data length (Byte)
CRC Low
1
CRC High
1
CRC CHECK function is shown as below:
unsigned int crc_chk_value(unsigned char *data_value, unsigned char length)
{
unsigned int crc_value=0xFFFF;
int i;
while(length--)
{ crc_value^=*data_value++;
for(i=0;i<8;i++)
{ if(crc_value&0x0001)
crc_value=( crc_value>>1)^0xA001;
else
crc_value= crc_value>>1;
}
}
return(crc_value);
}
E500 Series Universal Low-Power Inverter
    "