Read Hold Register; Write A Single Hold Register; Write Multiple Hold Registers - Ebyte M02-XACX0420 User Manual

Table of Contents

Advertisement

Chengdu Ebyte Electronic Technology Co.,Ltd.
returned 02.

7.3.2 Read hold register

Read one or more register values using 03Function code, for example, read DO1 working mode.
20
Modbus
address of the
Function code
device
After sending the above command to the device via RS232, the device will return the following
values:
20
Modbus
address of the
Function code
device
The above 00 00 indicates that DO1 is the level mode.

7.3.3 Write a single hold register

Write a single hold register using 06Function code, e.g., set DO1 to pulse mode 用 06Function code.
20
Modbus
Function
address of the
device
After sending the above command to the device via RS232, the device will return the following
values.
20
Modbus
Function
address of the
device
If the change succeeds, the data in register 0x0578 is 0x0001.

7.3.4 Write multiple hold registers

Use 10Function code to write multiple register holding commands, e.g., set do1-DO4 working mode
simultaneously.
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd.
03
Register initial
address
02
The number of
bytes of data
06
05 78
Register address
code
06
05 78
Register address
code
05 78
The number of
registers read
02
Returned data
Writes Value
Writes Value
【4AI+2DO】 MA02-XACX0420
00 01
XX XX
CRC CHECK
CODE
00 00
XX XX
CRC CHECK
CODE
00 01
XX XX
CRC CHECK
00 01
XX XX
CRC CHECK
33
User Manual
CODE
CODE

Advertisement

Table of Contents
loading

Table of Contents