Write Multiple Do Coil States; Read Input Register - 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.
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
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
address
code
After sending the above command to the device via the 485 bus, the device will return the following values:
20
Device ModBus
function
address
code
The coils of DO2 and DO3 are turned on.

7.3.7 Read input register

Take the example of collecting the original values of 4 AI channels, use the function code 04 to read the original values
of the 4 AI channels.
20
04
Device Modbus
function
address
code
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd.
05
00 00
Register address
05
00 00
Register address
0F
00 00
starting
Number of coils
address
0F
00 00
Register address
00 00
initial
address
FF 00
Data written
Coil action: conduction
FF 00
Write value
00 04
01
Number of
bytes of data
OO O4
Number of coils
00 04
AI channels number: 4
【2DI+2AI+2DO】MA02-AACX2220 User Manual
XX XX
CRC check code
XX XX
CRC check code
06
XX XX
Control coil
CRC check
data
(bit operation)
XX XX
CRC check
XX XX
CRC check code
code
code
40

Advertisement

Table of Contents
loading

Table of Contents