Read Holding Register; Write A Single Holding Register; Write Multiple Holding Registers - 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.

7.3.2 Read holding register

Use 03 function code to read one or more register values, for example: read DO1 working 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 above 00 00 indicates that DO1 is in level mode.

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 RS232, 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.
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd.
03
05 78
Register start address
03
02
Number of bytes of data
06
05 78
Register address
06
05 78
Register address
【2DI + 2AI + 4DO】 MA02-AACX2240 User Manual
00 01
Register read
quantity
00 00
Returned data
00 01
Data written
00 01
Data written
XX XX
CRC check code
XX XX
CRC check code
XX XX
CRC check code
XX XX
CRC check code
38

Advertisement

Table of Contents
loading

Table of Contents