Mod Bus Instruction Operation Example - Ebyte ME31-XAXA0404 User Manual

I/o networking module
Table of Contents

Advertisement

Chengdu Ebyte Electronic Technology Co., Ltd.
active upload
MOSBUS
TCP/RTU
conversion enable
MODBUS address
filtering

4.7.5 Mod bus instruction operation example

1. Read Coil (D O ) Status
Use the read coil state (01 ) function code to read the output coil state, for example:
01
Modbus address
After sending the above command to the device through the 485 bus, the device will return the following values:
01
M odbus address
The above returned status data 0 1 indicates that the output DO 1 is turned on .
2. Control Coil (D O ) Status
Support operation of single coil (0 5 ), operation of multiple coils ( 0F ) function code operation.
Use the 0 5 command to write a single command, for example :
01
Modbus address
After sending the above command to the device through the 485 bus, the device will return the following values:
Copyright © 2012–2023 , Chengdu Ebyte Electronic Technology Co., Ltd.
23
holding
0x08E7
register
holding
0x08E8
register
holding
0x08E9
register
01
00 00
register first
function code
address
01
function code
05
function code
0x0000 disabled, others:
1
R W
1 ~ 6 5535 s periodic
sending
1
R W
1
R W
Number of output coils read
01
bytes of data
returned status data
00 00
Conduction: F F 00
register first address
ME31- XAXA0404 _User Manual
0, close, 1 open protocol
conversion
0: transparent
transmission, 1-255:
when the data is not
local, check the slave
address of the command
command, and it can be
passed when it is the set
value
00 0 4
0 1
CRC check code
FF 00
CRC check code
Off: 0 0 00
R : 0x03
W : 0x06 , 0x10
R : 0x03
W : 0x06 , 0x10
R : 0x03
W : 0x06 , 0x10
3D C9
CRC check code
90 48
8C 3A

Advertisement

Table of Contents
loading

Table of Contents