102 VICSION VS500
Response by the slave:
PDU part
06
Data length (Byte)
1
Register start
Register start
address, high-order address, low-order
1
1
Register data,
high-order
1
Register data,
low-order
1
The slave will conduct objection response in case of occurrence of certain error.
Objection response:
PDU part
0x80+function code
Data length (Byte)
1
Objection code
1
Objection code indicates the error type:
Objection code
01
02
03
04
20
21
22
23
Error corresponded
Illegal function code
Illegal data address
Data exceeding limit
Invalid operation of slave
Excessive parameters read
Retention and implicit parameters read and written
Data modification prohibited during slave running
Data modification protected by password
4.3 CRC
CRC
Data length (Byte)
CRC low-order
1
CRC function is as follows:
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);
}
CRC high-order
1
VS500 series of general purpose inverter Duxe.ru
    "