Download Print this page

Veichi AC10 Series Technical Manual page 37

Advertisement

Communication
frame
Protocol
Note: The AC10 series only supports RTU mode.
5.2.3 Information format
In RTU mode, a new frame begins with a transmission time pause interval of at least 3.5 bytes. The data fields transmitted next are: slave address,
operation command code, data and check word, the transmission of the last byte is completed, and the end of the frame is indicated by a transmission
time interval of at least 3.5 bytes. . The RTU data frame format is shown in the figure below.
Start with at leas t
3.5 characters of
Slave address
Please set a value from 0 to 247 (decimal). When the slave address is set to 0, the master is broadcast, and all slaves receive the command.
For broadcast transmission, the slave does not send a response message to the primary station.
Command code
Command code
03H
06H
08H
Data
The data of the parameter code of the drive and the data corresponding to the parameter code are combined into a series of data, including reading the
parameter code or the data of the specific address, writing the data to the parameter code or the specific address, etc.
Check
The standard Modbus communication uses two error detection methods, in which parity is used for verification of each character, and CRC detection is
used to verify one frame of data.
1.
Parity
The user can configure whether the controller is odd or even parity, or no parity. This will determine how the parity bit in each character is set.
If odd or even parity is specified, the number of bits of "1" will be counted in the number of bits per character (7 data bits in ASCII mode and 8 data bits in
RTU). For example, the RTU character frame contains the following 8 data bits: 1 1 0 0 0 1 0 1 , the number of the entire "1" is 4.
If even parity is used, the parity bit of the frame will be 0, and the total number of "1"s will still be four. If an odd parity is used, the parity bit of the frame
will be 1, and the number of the entire "1" is five.
If no parity bit is specified, there is no parity bit during transmission and no parity check is performed. Instead of an additional stop bit, it is filled into the
character frame to be transmitted.
2.
CRC-16 (Cyclic Redundancy Check)
Using the RTU frame format, the frame includes a frame error detection field calculated based on the CRC method. The CRC field detects the contents of
the entire frame. The CRC field is two bytes and contains a 16-bit binary value. It is calculated by the transmission device and added to the frame. The
receiving device recalculates the CRC of the received frame 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 0xFFFF, and then a procedure is called to process the consecutive six or more bytes in the frame 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 direction, and the most significant bit is padded with 0s. The LSB is extracted and detected. 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
octet is individually different from the current value of the register. The value in the final register is the CRC value after all the bytes in the frame have been
executed.
This calculation method of CRC adopts the international standard CRC check rule. When editing the CRC algorithm, the user can refer to the CRC algorithm
of the relevant standard to write a CRC calculation program that truly meets the requirements.
5.2.4 Communication instruction example
Read slave parameter command code: 03H, read N words (Word), up to 20 words can be read continuously.
For example, if the slave address is 01H, the memory start address is 2100H ([C00-00]). If three consecutive words are read, the structure of the frame is
described as follows:
RTU host command information:
START
Slave address
Command code
Baud rate: 1200, 2400, 4800, 9600, 19200, 38400, 57600, bps
Data length: 8 bits (fixed)
Check: odd, even, no
Stop bit: 1 bit (fixed)
Modbus protocol (RTU only (mode)
RTU data format
Slave
Comman
address
d code
idle
3.5 bytes of transmission time
01H
03H
MODBUS message
Data
Check
Features
Read slave parameters
Read slave parameters
Loop self-test
33
Network Communication
End at least
3.5 characters
of idle
AC10 Series Frequency Inverter Technical Manual

Advertisement

loading

This manual is also suitable for:

Sis series