Chengdu Ebyte Electronic Technology Co., Ltd.
【
4DI+2DO
】
MA01-AXCX4020 User Manual
Copyright ©2012–2023, Chengdu Ebyte Electronic Technology Co., Ltd.
33
7.2.3 Write a single holding register
Use 06 function code to write a single holding register, for example: set the working mode of DO1 to pulse mode
20
06
05 78
00 01
XX XX
Device ModBus
address
function code
Register address
Data written
CRC check code
After sending the above command to the device via the 485 bus, the device will return the following values:
20
06
05 78
00 01
XX XX
Device ModBus
address
function code
Register address
Data written
CRC check code
If the modification is successful, the 0x0578 register data is 0x0001.
7.2.4 Write multiple holding registers
Use 10 function code to write commands for multiple holding registers, for example: set the working mode of DO1-DO4
at the same time.
20
10
05 78
00 04
08
0001 0002
XX XX
Device ModBus
address
function code
Register
start address
Number of
registers
The number
of bytes of
data written
Data written
CRC check
code
After sending the above command to the device via the 485 bus, the device will return the following values:
20
10
05 78
00 04
XX XX
Device ModBus
address
function code
Register
address
Number of registers
CRC check
code
If the modification is successful, the values of four consecutive registers with 0x0578 as the starting address are 0x0001,
0x0002, 0x0003, and 0x0000, respectively.
7.2.5 Write the status of a single DO coil
Use 05 command to write a single command, for example: set the working mode of DO1 to pulse mode
Summary of Contents for MA01-AXCX4020
Page 1: ...4DI 2DO MA01 AXCX4020...