IDEC SmartAXIS FT9Z-1A01 User Manual page 279

Table of Contents

Advertisement

Communication Protocol
This section describes the communication frame format used for Modbus RTU communication.
Communication Frame Format
Request from Modbus Master
Idle
3.5 characters
ACK Reply from Modbus Slave
Idle
3.5 characters
NAK Reply from Modbus Slave
Idle
3.5 characters
Note: Note: Idle means no data flowing on the communication line.
Communication Frame Format
RTU mode requires a minimum of 3.5-character-long idle time between frames to determine the beginning of a frame. The
SmartAXIS Modbus master sends requests at idle intervals of 5ms, which can be changed in the Function Area Settings dialog box.
Slave No.
The SmartAXIS can be assigned slave numbers 1 through 247. In the 1:1 communication using RS232C, the same slave number
must be set in the master and the SmartAXIS.
Slave No. 0 is reserved for broadcast slave number and is used to write the same data to all Modbus slaves. In this case, the
Modbus slaves do not send a reply to the master.
Modbus Communication NG Reply Error Code
One of the following error codes is stored in NAK reply.
01h: Function code error (unsupported function code)
02h: Access destination error (address out of range, address+device quantity out of range)
03h: Device quantity error, 1-bit write data error
CRC
RTU mode uses CRC check codes.
Modbus RTU Mode — Calculating the CRC-16 (cyclic redundancy checksum)
Calculate the BCC using CRC-16 for the range from the slave number to the byte immediately before the BCC. The generation
16
15
polynomial is: X
+ X
+ X
1.
Take the exclusive OR (XOR) of FFFFh and the first 1-byte data at the slave number.
Shift the result by 1 bit to the right. When a carry occurs, take the exclusive OR (XOR) of A001h, then go to step 3.
2.
If not, directly go to step 3.
Repeat step 2, shifting 8 times.
3.
Take the exclusive OR (XOR) of the result and the next 1-byte data.
4.
Repeat step 2 through step 4 up to the byte immediately before the BCC.
5.
Swap the higher and lower bytes of the result of step 5, and store the resultant CRC-16 to the BCC (CRC) position. (Example:
6.
1234h  34h, 12h)
Slave No.
Function Code
1 byte
1 byte
Slave No.
Function Code
1 byte
1 byte
Function Code +
Slave No.
80H
1 byte
1 byte
2
+ 1.
S
A XI S P
M AR T
R O
Data
Data
Error Code
1 byte
/ L
U
'
M
FT9Y-B 1378
I TE
SER
S
ANUAL
11: M
C
ODBUS
OM M UN I CATI ON
CRC
Idle
3.5 characters
2 bytes
CRC
Idle
3.5 characters
2 bytes
CRC
Idle
3.5 characters
2 bytes
11-11

Advertisement

Table of Contents
loading

Table of Contents