157
3.5 CRC 16 check method:
CRC (cyclic redundancy check) uses RTU frame format, and the message includes error detection domain
based on CRC method. The CRC field detects the content of the entire message. The CRC field is two bytes and
contains 16 - bit binary values. It is calculated by the transmission device and added to the message. The receiving
device recalculates the CRC of the received message and compares it with the value in the received CRC field. If the
two CRC values are not equal, then there is an error in the transmission.
CRC is stored in 0xffff first, and then calls a procedure to process the consecutive 8 - bit bytes in the message with
the value in the current register. Only 8bit data in each character is valid for CRC, and neither start bit nor stop bit nor
parity bit is valid.
During CRC generation, each 8 - bit character is exclusive or (xor) different from the register contents. The result
is shifted toward the least significant bit and the most significant bit is filled with 0. LSB is extracted and detected. If
LSB is 1, the register is different from the preset value or if LSB is 0, it will not be carried out. The whole process has
to be repeated eight times. After the last bit (bit 8) is completed, the next 8 - bit byte differs from the current value of
the register or separately. The value in the final register is the CRC value after all bytes in the message are executed.
When CRC is added to the message, the low byte is added first and then the high byte. The CRC simple
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^=*dat+;
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
)
;
}
Содержание HV480 Series
Страница 1: ...HV610 Series Frequency Inverter User Manual HNC Electric Limited ...
Страница 12: ...8 2 2 3 Frequency inverter control loop terminal description ...
Страница 13: ...9 ...
Страница 166: ...162 Appendix II Plastic shell dimensions and mounting dimensions Fig 1 R75G3 2R2G3 Fig 2 004G3 7R5G3 ...
Страница 167: ...163 Appendix III dimensions and mounting dimensions of sheet metal machines Fig 3 011G3 200G3 Fig 4 185G3 560G3 ...