EasyManuals Logo
Home>Inovance>Inverter>MD500 Series

Inovance MD500 Series User Manual

Inovance MD500 Series
340 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #214 background imageLoading...
Page #214 background image
7. Interfaces and Communication
- 213 -
7
â– 
CRC Check
In Modbus-RTU mode, a message includes a CRC-based error-check eld. The CRC eld
checks content of entire message. The CRC eld is two bytes, containing a 16-bit binary
value. The CRC eld is calculated by transmitting device, and then added to message.
The receiving device recalculates a CRC value after receiving message, and compares
the calculated value with the CRC value in the received CRC eld.
The CRC is rst stored to 0xFFFF. Then a procedure is invoked to process the successive
8-bit byte in the message and the value in the register. Only the eight bits in each
character are used for the CRC. The start bit, stop bit and the parity bit do not apply to the
CRC.
During generation of the CRC, each eight-bit character is in exclusive-OR (XOR) with the
content in the register. Then the result is shifted in the direction of the least signicant bit
(LSB), with a zero lled into the most signicant bit (MSB) position. The LSB is extracted
and examined. If the LSB was a 1, the register then performs XOR with a preset value.
If the LSB was a 0, no XOR is performed. This process is repeated until eight shifts have
been performed. After the last (eighth) shift, the next eight-bit byte is in XOR with the
register's current value, and the process repeats for eight more shifts as described above.
The nal value of the register, after all the bytes of the message have been applied, is the
CRC value.
The CRC is added to the message from the low-order byte followed by the high-order
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^=*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
)
;
}

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Inovance MD500 Series and is the answer not in the manual?

Inovance MD500 Series Specifications

General IconGeneral
BrandInovance
ModelMD500 Series
CategoryInverter
LanguageEnglish

Related product manuals