Examples Of Modbus Command Operation Instructions - Ebyte ME31-AAAX2240 User Manual

Network i/o networking module
Hide thumbs Also See for ME31-AAAX2240:
Table of Contents

Advertisement

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

4.9.6. Examples of Modbus command operation instructions

1. Read coil (DO) status
Use the read coil state (01) function code to read the output coil state, for example:
01
Modbus address
Function code
After sending the above command to the device through the 485 bus, the device will return the following values:
01
Modbus address
The status data 01 returned above indicates that the output DO1 is turned on.
2. Control coil (DO) state
Support operation of single coil (05), operation of multiple coils (0F) function code operation.
Use the 05 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:
01
Modbus address
Copyright ©2012–2023, Chengdu Ebyte Electronic Technology Co.,Ltd
Holding
0x08E8
register
Holding
0x08E9
register
01
00 00
Register first
address
01
Function code
05
Function code
Register first address
05
Function code
Register first address
sending
0, close, 1 open protocol
1
RW
transmission, 1-255:
when the data is not
local, check the slave
1
RW
command , and it can be
passed when it is the set
00 04
Number of output coils read
01
Bytes of data
Returned status data
00 00
Continuity: FF 00
Close: 00 00
00 00
Operation method
ME31-AAAX2240_UserManual_EN
R:0x03
conversion
W:0x06、0x10
0: transparent
R:0x03
address of the
W:0x06、0x10
value
CRC check code
01
90 48
CRC check code
FF 00
8C 3A
CRC check code
FF 00
8C 3A
CRC check code
3D C9
28

Advertisement

Table of Contents
loading

Table of Contents