Modbus Message Rtu Framing; Crc Checking - BONFIGLIOLI Vectron ACTIVE Manual

Modbus communication with cm-232/cm-485/cm-485t. frequency inverter 230 v / 400 v
Hide thumbs Also See for ACTIVE:
Table of Contents

Advertisement

6.7.1.3
A MODBUS message is placed by the transmitting device into a frame that has a
known beginning and ending point. This allows devices that receive a new frame to
begin at the start of the message, and to know when the message is completed.
Partial messages must be detected and errors must be set as a result. In RTU mode,
message frames are separated by a silent interval of at least 3.5 character times
>= 3.5 char
The entire message frame must be transmitted as a contiguous stream of charac-
ters.
If a silent interval of more than 1.5 character times occurs between two characters,
the message frame is declared incomplete and is discarded by the inverter.
6.7.1.4
The RTU mode includes an error–checking field that is based on a Cyclical Redun-
dancy Checking (CRC) method performed on the message contents.
The CRC field checks the contents of the entire message. It is applied regardless of
any parity checking method used for the individual characters of the message.
The CRC field contains a 16–bit value implemented as two 8–bit bytes.
The CRC field is appended to the message as the last field in the message. It is ap-
pended in the sequence "low-order byte", "high-order byte". The CRC high–order
byte is the last byte to be sent in the message.
The CRC value is calculated by the sending device, which appends the CRC to the
message. The receiving device recalculates a CRC during receipt of the message,
and compares the calculated value to the actual value it received in the CRC field. If
the two values are not equal, an error results.
The CRC calculation is started by first pre-loading a 16–bit register to all 1's
(0xFFFF). Then a process begins of applying successive bytes of the message to
the current contents of the register.
During generation of the CRC, each 8bit character is ExOR with the register con-
tents. 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 ex-
amined. If the LSB was a 1, the register is then ExOR with the fixed value 0xA001. If
the LSB was a 0, no ExOR takes place.
This process is repeated until eight shifts have been performed. After the last (eight)
shift, the next 8bit char is ExOR with the register's current value, and the process
repeats for eight more shifts as described above. The final content of the register,
after all the bytes of the message have been applied, is the CRC value.
When the CRC is appended to the message, the low-order byte is appended first,
followed by the high-order byte.
30
30

Modbus Message RTU Framing

Start
Address
Function
8 bits
8 bits

CRC Checking

Modbus Instruction manual
Modbus Instruction manual
MODBUS Message
Data
N x 8 bits
CRC
End
16 bits
>= 3.5 char
05/08
05/08

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ACTIVE and is the answer not in the manual?

This manual is also suitable for:

Active cube

Table of Contents

Save PDF