
Chengdu Ebyte Electronic Technology Co., Ltd.
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
20
Device ModBus
address
function
code
Return bytes Number
Switch quantity
output value
CRC check code
Modbus TCP Protocol Reads Switch quantity Output
:
Send
00 01
00 00
00 06
01
01
00 10
00 06
Transmissio
n identifier
Protocol
identifier
length
Unit
identificati
on
Function
code
Switch quantity
start address
Read switch
quantity number
Receive
00 01
00 00
00 04
01
01
01
03
Transmission
identifier
Protocol
identifier
length
Unit
identificatio
n
Function
code
Return bytes
Number
Switch quantity
output value
Control switch quantity DO output
Function code: 05, write a single coil state; 0F, write multiple coil states
Address range: 00017 (0x0010) ~ 00022 (0x0015)
Description: The passive relay of the equipment relay, the coil is not energized, the NC port of the relay is closed
with the COM port, the NO port is disconnected from the COM port; the coil is energized, the NC port of the relay is
disconnected from the COM port, and the NO port and the COM port are closed. The relay status is controlled by
commands.
example:
Function code 0x05 write DO2 switch quantity output, make NC2, COM2 open, NO2, COM2 close, write value is
FF 00; make NC2, COM2 close, NO2, COM2 open, write value 00 00.
Modbus RTU protocol write switch quantity output:
Send
01
05
00 11
FF 00
DC 3F
Device ModBus address
Function
code
Switch quantity
address
Write value
CRC check code
Receive
01
05
00 11
FF 00
DC 3F
Device ModBus address Function code
Switch
quantity
address
Write value
CRC check code
Modbus TCP protocol write switch quantity output:
Send
00 01
00 00
00 06
01
05
00 11
FF 00
Transmission
identifier
Protocol
identifier
length
Unit
identificatio
n
Function
code
Switch quantity
address
Write value
Receive
00 01
00 00
00 06
01
05
00 11
FF 00