IDEC FC6A-C16K1CE Communications Manual page 137

Fc6a series microsmart all-in-one type
Hide thumbs Also See for FC6A-C16K1CE:
Table of Contents

Advertisement

Communication Protocol
This section describes the communication frame format used for Modbus RTU communication.
Modbus RTU Mode Communication Format
Request from Modbus Master
Idle
3.5 characters
ACK Reply from Modbus RTU Slave
Idle
3.5 characters
NAK Reply from Modbus RTU Slave
Idle
3.5 characters
Note: Idle means no data flowing on the communication line.
Communication Frame Format
Modbus RTU mode requires a minimum of 3.5-character-long idle time between frames to determine the beginning of a frame. The
FC6A Series MicroSmart Modbus master sends requests at idle intervals of 5 ms, which can be changed in the Function Area
Settings dialog box.
Slave No.
The FC6A Series MicroSmart 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 FC6A Series MicroSmart.
Slave No. 0 is reserved for broadcast slave number and is used to write the same data to all Modbus RTU slaves. In this case, the
Modbus RTU slaves do not send a reply to the master.
Modbus RTU 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
Modbus 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
Take the exclusive OR (XOR) of FFFFh and the first 1-byte data at the slave number.
1.
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.
5.
Repeat step 2 through step 4 up to the byte immediately before the BCC.
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
Slave No.
Function Code
1 byte
Function Code +
Slave No.
1 byte
2
+ 1.
FC6A S
M
S
A
ERIES
ICRO
MART
LL
Data
1 byte
Data
1 byte
Error Code
80H
1 byte
1 byte
-
-O
T
C
IN
NE
YPE
OMMUNICATION
6: M
ODBUS
CRC
3.5 characters
2 bytes
CRC
3.5 characters
2 bytes
CRC
3.5 characters
2 bytes
M
FC9Y-B1730
ANUAL
C
OMMUNICATION
Idle
Idle
Idle
6-11

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents