Instruction Format (Partial); Read Do Output Coil Status; Read Holding Register; Write A Single Holding Register - Ebyte MA02-XACX0440 User Manual

Table of Contents

Advertisement

Chengdu Ebyte Electronic Technology Co.,Ltd.

7.3 Instruction format (partial)

7.3.1 Read DO output coil status

Use 01 function code to read the output coil status, for example: read the status of two output coils
20
Device
Modbus
address
After sending the above command to the device via RS232, the device will return the following
values:
20
Device
Modbus
address
The status data 02 returned above indicates that the output DO2 is on.

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
address
After sending the above command to the device via RS232, the device will return the following
values:
20
Device
Modbus
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
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd.
01
00 00
function
Register start address
code
01
function
Number of bytes of
code
03
function
Register start address
code
03
function
Number of bytes of
code
06
function
Register address
code
Number of output
01
Status data returned
data
05 78
Number of registers
02
Returned data
data
05 78
Write value
【4AI+4DO】MA02-XACX0440
00 02
CRC check code
coils read
02
CRC check code
00 01
CRC check code
read
00 00
CRC check code
00 01
CRC check code
User Manual
XX XX
XX XX
XX XX
XX XX
XX XX
35

Advertisement

Table of Contents
loading

Table of Contents