Write A Single Hold Register; Write Multiple Hold Registers; Write A Single Do Coil Status - Ebyte 8DO User Manual

Table of Contents

Advertisement

Chengdu Ebyte Electronic Technology Co.,Ltd.
Device Modbus
The function
address
The above 00 00 indicates that DO1 is level mode.

7.2.3 Write a single hold register

Write a single hold register using the 06 function code, for example, set the operating mode of DO1 to pulse mode
20
Device Modbus
The function
address
When the above command is sent to the device via the 485 bus, the device returns the following values:
20
Device Modbus
The function
address
If the modification is successful, the 0x0578 register data is 0x0001.

7.2.4 Write multiple hold registers

Write multiple hold register commands using 10 function codes, for example, set the do1-DO4 operating mode at the
sametime.
20
Device Modbus
The function
address
When the above command is sent to the device via the 485 bus, the device returns the following values:
20
Device Modbus
The function
address
If the modification is successful, the values of thefour consecutive registers with 0x 0578 as the starting address are
x0001, 0x0002, 0x0003, 0x0000.

7.2.5 Write a single DO coil status

Use the 05 command to write a single command, for example, to set do1 to pulse mode
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd.
The number of bytes of the
code
data
06
05 78
Register address
code
06
05 78
Register address
code
10
05 78
Register
code
start address
10
05 78
Register
code
address
【8DO】MA01 -XXCX0080 User Manual
The data returned
00 01
Write the value
00 01
Write the value
00 04
08
The number
The number
of bytes
of registers
written to
the data
00 04
The number of registers
CRC check code
XX XX
CRC check code
XX XX
CRC check code
0001 0002
XX XX
The data
CRC check
written
code
XX XX
CRC check
code
0
32

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents