
FC6A S
ERIES
M
ICRO
S
MART
A
LL
-
IN
-O
NE
T
YPE
C
OMMUNICATION
M
ANUAL
FC9Y-B1730
6-11
6: M
ODBUS
C
OMMUNICATION
Communication Protocol
This section describes the communication frame format used for Modbus RTU communication.
Modbus RTU Mode Communication Format
Request from Modbus Master
ACK Reply from Modbus RTU Slave
NAK Reply from Modbus RTU Slave
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, 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
polynomial is: X
16
+ X
15
+ X
2
+ 1.
1.
Take the exclusive OR (XOR) of FFFFh and the first 1-byte data at the slave number.
2.
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
.
If not, directly go to step
3
.
3.
Repeat step
2
, shifting 8 times.
4.
Take the exclusive OR (XOR) of the result and the next 1-byte data.
5.
Repeat step
2
through step
4
up to the byte immediately before the BCC.
6.
Swap the higher and lower bytes of the result of step
5
, and store the resultant CRC-16 to the BCC (CRC) position. (Example:
1234h
→
34h, 12h)
Idle
3.5 characters
Slave No.
Function Code
Data
CRC
Idle
3.5 characters
1 byte
1 byte
2 bytes
Idle
3.5 characters
Slave No.
Function Code
Data
CRC
Idle
3.5 characters
1 byte
1 byte
2 bytes
Idle
3.5 characters
Slave No.
Function Code +
80H
Error Code
CRC
Idle
3.5 characters
1 byte
1 byte
1 byte
2 bytes
Содержание MICROSmart FC6A-C16K1CE
Страница 1: ...B 1730 2 FC6A SERIES All in One Type Communication Manual...
Страница 60: ...3 COMMUNICATION SETTINGS 3 22 FC6A SERIES MICROSMART ALL IN ONE TYPE COMMUNICATION MANUAL FC9Y B1730...
Страница 76: ...4 MAINTENANCE COMMUNICATION 4 16 FC6A SERIES MICROSMART ALL IN ONE TYPE COMMUNICATION MANUAL FC9Y B1730...
Страница 126: ...5 USER COMMUNICATION INSTRUCTIONS 5 50 FC6A SERIES MICROSMART ALL IN ONE TYPE COMMUNICATION MANUAL FC9Y B1730...
Страница 158: ...6 MODBUS COMMUNICATION 6 32 FC6A SERIES MICROSMART ALL IN ONE TYPE COMMUNICATION MANUAL FC9Y B1730...
Страница 200: ...8 J1939 COMMUNICATION 8 32 FC6A SERIES MICROSMART ALL IN ONE TYPE COMMUNICATION MANUAL FC9Y B1730...
Страница 218: ...10 SEND E MAIL FUNCTION 10 16 FC6A SERIES MICROSMART ALL IN ONE TYPE COMMUNICATION MANUAL FC9Y B1730...
Страница 252: ...INDEX 4 FC6A SERIES MICROSMART ALL IN ONE TYPE COMMUNICATION MANUAL FC9Y B1730 INDEX...