Chengdu Ebyte Electronic Technology Co.,Ltd.
E150-400T30S user manual
Copyright ©2012–2022
,
Chengdu Ebyte Electronic Technology Co.,Ltd.
10
Chapter 5 Introduction to Modbus RTU Commands
Modbus RTU has a total of 8 function codes (hexadecimal), and their meanings are as follows:
function code
illustratation
function code
illustration
01
Read coil status
05
write coil status
02
Read discrete input
06
write a single register
03
read holding register
0F
write multiple coils
04
read input register
10
write multiple registers
E150-400T30S modules can communicate with E22-400Txxx series modules wirelessly, but the following
conditions must be met:
Both modules need to work in "transparent mode";
The parameters of "air rate", "channel address", "module address" and "network number" of both modules
must be consistent;
The following commands related to remote wireless communication must meet the above conditions.
5.1 Read coil status
Using the read coil status (01) function code to read the output coil status, for example: read the status of
do1 ~ do4
01
01
00 00
00 04
3D C9
Device MODBUS
address
Function code
Register
head address
Number of output
coils read
CRC check
code
CRC check code note: the CRC check code of the last two bytes of the sending instruction needs to be calculated
by the user.
Serial port sending: 01 01 00 00 04 3D C9
Remote wireless transmission: 01 01 00 00 00 04 3D C9
After the above command is sent to the device through the serial port or wireless, the device will return the
following values to the serial port or wireless:
01
01
01
0F
11 8C
Device MODBUS
address
Function code
Number of
bytes of data
Returned
status
data
CRC check
code
The returned status data 0f indicates that the outputs do1 to do4 are at a high level.
Serial port receiving return value: 01 01 01 0f 11 8C