EasyManuals Logo

Inovance MD800 Series Communications Guide

Inovance MD800 Series
122 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 #23 background imageLoading...
Page #23 background image
Modbus Communication
22
message. The receiving device recalculates a CRC value after receiving the message,
and compares the calculated value with the CRC value in the received CRC field. If the
two CRC values are unequal, a transmission error occurs.
The CRC is first stored to 0xFFFF. Then a procedure is invoked to process the
successive 8‑bit bytes 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
significant bit (LSB), with a zero filled into the most significant bit (MSB) position. The
LSB is extracted and examined. If the LSB is 1, the register then performs XOR with a
preset value. If the LSB is 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 another eight shifts
as described above. The final value of the register, after all the bytes of the message
have been applied, is the CRC value.
When CRC is added in a message, high‑order bytes follow low‑order bytes. 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;
}
}
}

Table of Contents

Other manuals for Inovance MD800 Series

Questions and Answers:

Question and Answer IconNeed help?

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

Inovance MD800 Series Specifications

General IconGeneral
BrandInovance
ModelMD800 Series
CategoryDC Drives
LanguageEnglish

Related product manuals