Write A Single Holding Register; Write Multiple Holding Registers; Write The Status Of A Single Do Coil - Ebyte MA02-AAC 2220 Series User Manual

2di + 2ai + 2do
Hide thumbs Also See for MA02-AAC 2220 Series:
Table of Contents

Advertisement

Chengdu Ebyte Electronic Technology Co.,Ltd.

7.3.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
Device ModBus
function code
address
After sending the above command to the device via the 485 bus, the device will return the following values:
20
Device ModBus
function code
address
If the modification is successful, the 0x0578 register data is 0x0001.

7.3.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
Device ModBus
function code
address
After sending the above command to the device via the 232 bus, the device will return the following values:
20
Device ModBus
function code
address
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.3.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
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd.
06
05 78
Register address
06
05 78
Register address
10
05 78
Register
start address
10
05 78
Register
address
00 01
Data written
00 01
Data written
00 04
08
The number
Number of
of bytes of
registers
data written
00 04
Number of registers
【2DI+2AI+2DO】MA02-AACX2220 User Manual
XX XX
CRC check code
XX XX
CRC check code
0001 0002
CRC check
Data written
CRC check
XX XX
code
XX XX
code
39

Advertisement

Table of Contents
loading

Table of Contents