EasyManua.ls Logo

Alpha AS600M Series - Command Code

Alpha AS600M Series
97 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Appendix 2 Use of MODBUS Communication
85
PLC PLC变频 频器
t(ms)
3.5char Pb.04
3.5char
5ms以
指令
响应
指令
PLC
Driver address: driver address (0 ~ 31)
When it is set to 0, commands are transmitted together in the broadcast manner. Even if
the broadcast command is received, the driver will not give response.
Command Code
There are four types of MODBUS command codes supported by the series of
drivers, which are showed as follows:
Command
Code
(16 bits )
Function
Command Length
(BYTE)
Normal Response
Length
(BYTE)
Abnormal Response
Length
(BYTE)
Minimum Maximum Minimum Maximum Minimum Maximum
03H
Reading
Record
8 8 7 7 5 5
06H
Single
Character
Writing
8 8 8 8 5 5
08H
Loopback
Test
8 8 8 8 5 5
10H
Writing
Record
11 11 8 8 5 5
CRC-16 method
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 inverter address is MSB, and the final data MSB uses
LSB to calculate CRC-16.
3) The response command of inverter also has to calculate CRC-16 to be
compared with CRC-16 in the response command.
unsigned int CRC16(unsigned char*uptrunsigned int ulenth)
{
unsigned int crc=0xffff ;
unsigned char uindex ;
if(ulenth>=9)
{
Driver
Driver Driver
Comman
Res
p
onse
Comman
Pb.04
Over 5ms

Table of Contents