Chengdu Ebyte Electronic Technology Co.,Ltd.
ME31-XAAX0440_UserManul_EN
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd.
23
Use 03 function code to read one or more register values, for example:
01
03
05 78
00 01
04 DF
Modbus address
Function Code
Register first
address
Number of registers read
CRC checkcode
After sending the above command to the device via the 485 bus, the device will return the following values:
01
03
02
00 00
B8 44
Modbus address
Function Code
Number of bytes of
data
Returned data
CRC checkcode
The above 00 00 indicates that DO1 is in level output mode.
(
4
)
Operation holding register
Support operation of single register (06), 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
06
05 78
00 01
C8 DF
Modbus address
Function Code
Register Address
Write value
CRC checkcode
After sending the above command to the device via 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 checkcode
If the modification is successful, the 0x0578 register data is 0x0001, and the pulse output mode is turned on.
Use 10 function code to write commands for multiple holding registers, for example: set the working modes 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
Number of
registers
The number of bytes of
data written
Data written
CRC
checkcode
After sending the above command to the device via the 485 bus, the device will return the following values:
01
10
05 78
00 02
C1 1D
Modbus address
Function Code
Register Address
Number of registers
CRC checkcode E
If the modification is successful, the values of two consecutive registers with 0x0578 as the starting address are
respectively 0x0001 and 0x0001 to indicate DO1 and DO2 start pulse output.