Chengdu Ebyte Electronic Technology Co.,Ltd
ME31-XAXX0600_UserManual_CN
Copyright ©2012–2023
,
Chengdu Ebyte Electronic Technology Co.,Ltd
23
01
03
02
00 00
B8 44
Modbus address
Function code
Number of bytes of
data
Data returned
CRC check code
The above 00 00 indicates that DO1 is in level output mode.
4. Operate Holding register
Support operation of single register (06), operation of multiple registers (10) function code operation.
Use the 06 function code to write a single Holding register, for example: set the working mode of DO1 to pulse
mode
01
06
05 78
00 01
C8 DF
Modbus address
Function code
Register address
Write value
CRC check code
After the above command is sent to the device through the 485 bus, the device will return the following values:
01
06
05 78
00 01
C8 DF
Modbus address
Function code
Register address
Write value
CRC check code
If the modification is successful, the 0x0578 register data is 0x0001, and the pulse output mode is turned on.
Use the 10 function code to write multiple holding register commands, for example: set the working mode of DO1
and DO2 at the same time.
01
10
05 78
00 02
04
00 01 00 01
5A 7D
Modbus
address
Function
code
Register first
address
Register
number
Quantity of bytes of
written data
Written data
CRC check
code
After the above command is sent to the device through the 485 bus, the device will return the following values:
01
10
05 78
00 02
C1 1D
Modbus address
Function code
Register address
Register quantity
CRC check code
If the modification is successful, the values of the two consecutive registers with 0x0578 as the starting address are
0x0001 and 0x0001 respectively to identify DO1 and DO2 to enable pulse output.