Write A Single Hold Register; Write About Multiple Hold Registers - Ebyte MA02-XXCX0080 User Manual

Table of Contents

Advertisement

Chengdu Ebyte Electronic Technology Co.,Ltd.
After sending the above command to the device via RS232, the device returns the following values:
20
Device
Modbus
address
The above 00 00 indicates the DO1 as a level mode.

7.2.3 Write a single hold register

Write a single hold register using the 06 function code,For example, set the working mode of the
DO1 to the pulse mode
20
Device
Modbus
address
After sending the above command to the device via RS232, the device returns the following values:
20
Device
Modbus
address
If the modification is successful,The 0x0578 register data is 0x0001.

7.2.4 Write about multiple hold registers

Write multiple hold-register commands using the 10 function code,For example, set the DO1-DO4
working mode for DO1-DO4.
20
Device
Modbus
address
After sending the above command to the device via RS232, the device returns the following values::
20
Device
Modbus
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd.
03
02
Number of bytes of
FC
the data
06
05 78
FC
Register start address
06
05 78
FC
Register start address
10
05 78
Register
FC
start
address
10
05 78
Register
FC
start
00 00
The state data that
was returned
00 01
Write to the value
00 01
Write to the value
00 04
08
Number of
Number
bytes
of
written to
registers
the data
00 04
Number of registers
【8DO】MA02-XXCX0080 User Manual
XX XX
CRC checkcode
XX XX
CRC checkcode
XX XX
CRC checkcode
0001 0002
XX XX
CRC
Written data
checkcode
XX XX
CRC
checkcode
第 31 页

Advertisement

Table of Contents
loading

Table of Contents