Alpha 6000S series User Manual page 203

Table of Contents

Advertisement

Appendix 4 Use of MODBUS Communication
Command Formatting
During communication, the main controller (PLC, etc) gives commands to ALPHA6000S/ALPHA6000V,
and the frequency inverters respond to them. The process constitutes the information transmission &
receiving as showed in the right figure. As the command function content varies, the length of data will vary
as well. The interval between two commands should maintain the time recorded below.
PLC
Command
指令
3.5char
Frequency inverter address: Frequency inverter address (0 ~ 31)
When it is set as 0, commands are transmitted together with the broadcast manner. Even if the broadcast command is
received, the frequency inverter will not give response.
Command Code
There are four types of MODBUS command codes supported by the series of frequency inverters, which are
showed as follows:
Command
Code
Function
(16 bits )
03H
Reading Record
Single Character
06H
Writing
08H
Loopback Test
10H
Writing Record
CRC Check
The calculation method for CRC-16 used by MODBUS communication is as follows:
1. Generally, when CRC-16 is calculated, its initial value is 0, and the initial value of the communication terminal
series is set as 1. (1 for 16 bits)
2. LSB according to the frequency inverter address is MSB, and the final data MSB uses LSB to calculate CRC-16.
3. The response command of frequency inverter also has to calculate CRC-16 to be compared with CRC-16 in the
response command.
Unsigned int CRC16(unsigned char*uptr, unsigned int ulenth)
{
unsigned int crc=0xffff ;
unsigned char uindex ;
if(ulenth>=9)
{
ulenth=9;
}
while(ulenth!=0)
{
crc^=*uptr ;
for(uindex=0;uindex<8;uindex++)
{
if((crc&0x0001)==0)
{
crc=crc>>1 ;
202
Frequency
Frequency
变频器
变频器
Inverter
Inverter
Pb.04 Setting
Pb.04设定
Command Length
Minimum
Maximum
Byte
Number
Number
8
8
8
11
PLC
Response
响应
3.5char
Normal Response Length
Minimum
Byte
Byte
Number
8
7
8
8
8
8
11
8
Frequency
PLC
变频器
Inverter
Command
指令
Over 5ms
5ms以上
Abnormal Response Length
Maximum
Minimum
Byte
Byte
Number
Number
7
5
8
5
8
5
8
5
t(ms)
Maximum
Byte
Number
5
5
5
5

Advertisement

Table of Contents
loading

This manual is also suitable for:

6000v series6700s series

Table of Contents