EasyManua.ls Logo

dolycon CT112 Series - Page 53

dolycon CT112 Series
60 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...
Solar Pump Inverter Chapter 7 Communication protocol
49
the frame and the value in the register. Only the 8Bit data in every character is effective
to CRC, while the start bit, the end and the odd and even check bit is ineffective.
The calculation of CRC applies the international standard CRC checkout principles.
When you are editing CRC calculation, you can refer to the relative standard CRC
calculation to write the required CRC calculation program.
Here provided a simple function of CRC calculation for the reference (programmed with
C language)
unsigned int crc_cal_value(unsigned char*data_value,unsigned char data_length)
{
int i;
unsigned int crc_value=0xffff;
while(data_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);
}
Fault message response
The slave uses functional code fields and fault addresses to indicate it is a normal
response or some error occurs (named as objection response). For normal responses,

Related product manuals