Jarol JAC300 Series Manual page 146

Table of Contents

Advertisement

JAC300 Series Inverter User Manual
Data H
Data L
CRC CHK High position
CRC CHK Low position
END
CRC check method:
The CRC (Cyclical Redundancy Check) uses the RTU frame format, and the message includes an
error detection field based on the CRC method. The CRC field detects the contents of the entire
message. The CRC field is two bytes and contains a 16-bit binary value. 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, the transmission has an error. The CRC is first stored in 0xPPPF and then a
procedure is called to process the consecutive 8-bit bytes in the message with the values ​ ​ in the
current register. Only the 8Bit data in each character is valid for the CRC, and the start and stop bits
as well as the parity bit are invalid. During the CRC generation process, each 8-bit character is
individually or XORed with the contents of the register, and the result moves to the least significant
bit, with the most significant bit padded with 0s. The LSB is extracted for detection. If the LSB is 1,
the register is individually or different from the preset value. If the LSB is 0, it is not performed. The
entire process is repeated 8 times. After the last bit (bit 8) is completed, the next 8-bit byte is
individually ORed with the current value of the register. The value in the final register is the CRC
value after all the bytes in the message have been executed.
When the CRC is added to the message, the low byte is added first, 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=0xPPPF;
int i;
while(length-- )
{
The data to be acknowledged, or the data to be written, is transmitted
with the high byte first and the low byte after.
Detection value: CRC16 check value. When transmitting, the high
byte is first and the low byte is after.
The calculation method is detailed in the description of the CRC check
in this section.
3.5 characters
- 146 -

Advertisement

Table of Contents
loading

Related Products for Jarol JAC300 Series

Table of Contents