45
8
8
8
8 Communication
Communication
Communication
Communication Settings
Settings
Settings
Settings and
and
and
and instructions
instructions
instructions
instructions
8.1
Modbus RTU Communication Protocol Overview
Electrical interface: RS485 half duplex
Baud: 1200/2400/4800/9600/19200/38400
Address: Consists of one byte (8-bit binary), 0 to 255 in decimal, only 1 to 247 in the system, the
rest reserved
Error detection
:
CRC
Data format
:
Data length
:
Each byte bit: 1 bit start, 8 bit data (least significant bit sent first), no parity, 1 bit stop
MODBUS function code supported by ARD2F:
01 (0x01) Function code: Read coil state (relay output DO, address 0 corresponds to DO1)
02 (0x02) Function code: Read switch input state (DI, address 0 corresponds to DI1)
03/04 (0x03, 0x04) Function code: read hold register
05 (0x05) Function code: write coil state (control relay output DO, address 0 corresponds to DO1)
06 (0x06) Function code: Write a single register
16 (0x10) function code: Write multiple registers
Note: The operation control bit and output control bit are written in 16 function codes.
Communications applications
The examples in this section use the following tabular format (in hexadecimal data) whenever
possible
Addr
Fun
Data start
Data
CRC16
reg Hi
reg Lo
reg Hi
reg Lo
Lo
Hi
01H
03H
00H
00H
00H
06H
C5H
C8H
Add
Function
code
Data starting address
Data read qty
Cyclic
redundancy
check code
Read the data
Example 1: Read register using the 01 function: read the OUTPUT status of DO1-DO5 relay of
the 01 ARD2F protector
Check data frame
01 02 00 00 00 05 B8 09
Return
data
frame
01 02 01 10 A0 44
Example 2: Register read using the 02 function: read the di1-DI5 switch input status of the 01
ARD2F protector
Check data frame
01 01 00 00 00 05 FC 09
Return
data
frame
01 01 01 0C 51 8D
Address code
Function code
Data area
CRC check
1 byte
1 byte
N byte
2 byte