Write The Status Of A Single Do Coil; Write Multiple Do Coil States - Ebyte MA02-AAC 2240 Series User Manual

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

Advertisement

Chengdu Ebyte Electronic Technology Co.,Ltd.
20
Device ModBus
Function code
address
After sending the above command to the device via RS232, 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
20
Device ModBus
Function code
address
After sending the above command to the device via RS232, the device will return the following values:
20
Device ModBus
Function code
address
The DO1 coil is turned on.

7.3.6 Write multiple DO coil states

Use 0F function code to write a single command, for example: set the working mode of DO1 to pulse mode
20
Device ModBus
Function
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd.
10
05 78
Register
start address
10
05 78
Register address
05
00 00
Register address
05
00 00
Register address
0F
00 00
Number of coils
Starting
【2DI + 2AI + 4DO】 MA02-AACX2240 User Manual
00 04
08
The number
Number of
of bytes of
registers
data written
00 04
Number of registers
FF 00
Data written
Coil action: conduction
FF 00
Write value
00 04
01
Number of
0001 0002
XX XX
CRC check
Data written
code
XX XX
CRC check
code
XX XX
CRC check code
XX XX
CRC check code
06
XX XX
Control coil
CRC check
39

Advertisement

Table of Contents
loading

Table of Contents