Ebyte E830-DTU(2R2-433L)-V8 User Manual page 20

Table of Contents

Advertisement

Chengdu Ebyte Electronic Technology Co.,Ltd
Example 1.Use the 03 function code to read the register value, such as reading the Modbus address register, the command is as
follows:
01
Device ModBus
address
Return data value:
01
Device ModBus
Function code
address
Send instructions: 01 03 00 20 00 01 85 c0
Return data: 01 03 02 00 01 79 84
The return register value is 00 01, which means that the device address is 1.
Example 2.Use the 06 function code to write a register, for example, the value of the write and resend times register is 5 times, the
command is as follows:
01
Device ModBus
Function code
address
Return data value:
01
Device ModBus
Function code
address
Send instructions: 01 06 00 23 00 05 B8 03
Return data: 01 06 00 23 00 05 B8 03
In the send instruction, the write register value is 00 05, and the write value of the register representing the number of retransmissions
is 5.
Example 3.Use the 10 function code to write multiple registers, for example, set the resend number register value to 8 and the wireless
channel register set to 16:
01
10
Device ModBus
Write
address
commands
Return data value:
Copyright ©2012–2020,Chengdu Yibaite Electronic Technology Co., Ltd
03
Function code
Read register start address
03
Read returns the number of
06
Write the register address
06
Write the register address
00 23
Start address
00 20
Read register length
02
bytes
00 23
Write register values
00 23
Write register values
00 02
04
Number of write
Number of bytes
registers
written
E830-DTU(2R2-433L)-V8 User Manual
00 01
CRC checksum
00 01
Register value
CRC checksum
00 05
CRC checksum
00 05
CRC checksum
00 08 00 10
Write register
values
85 C0
79 84
B8 03
B8 03
31 AM
CRC
checksum
18

Advertisement

Table of Contents
loading

Table of Contents