Chengdu Ebyte Electronic Technology Co., Ltd.
ME31- XAXA0404 _User Manual
Copyright © 2012–2023 , Chengdu Ebyte Electronic Technology Co., Ltd.
24
01
05
00 00
FF 00
8C 3A
M odbus address
function code
register first address
Operation method
CRC check code
The DO1 coil is turned on.
Use 0 F function code as the command to write multiple coils, for example:
01
0F
00 00
00 0 4
01
0F
7E 92
M odbus
address
function
code
initial
address
Number of
coils
bytes of data
Control coil data
CRC check
code
After sending the above command to the device through the 485 bus, the device will return the following values:
01
0F
00 00
OO O 4
54 08
Modbus address _
function code
register address
Number of coils
CRC check code
The coils are all on.
3. read holding register
Use 03 function code to read one or more register values, for example:
01
03
0 5 78
00 01
0 4 DF
Mod bus address
function code
register first
address
Number of registers read
CRC check code
After sending the above command to the device through the 485 bus, the device will return the following values:
01
0 3
02
00 00
B8 44
Modbus address
function code
bytes of data
returned data
CRC check code
The above 00 00 means that DO1 is in level output mode .
4. Operation Holding Register
Support operation of single register (0 6 ), operation of multiple registers ( 10 ) function code operation.
Use 06 function code to write a single holding register, for example: set the working mode of DO1 to pulse mode
01
0 6
05 78
00 01
C 8 DF
Modbus address _ function code
register address
write value
CRC check code
After sending the above command to the device through the 485 bus, the device will return the following values: