Chengdu Ebyte Electronic Technology Co.,Ltd
E821-RTU (0400-ETH)User Manual
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
18
18
Function code 0x04, read AI1 input, assuming AI1 input is 9946uA, the corresponding value should be 0x26 DA
Modbus RTU protocol read analog-data input:
Send
01
04
00 13
00 01
C0 0F
Device ModBus
address
Function
code
Analog-data start
address
Read the number of
addresses
CRC check code
Receive
01
04
02
26 DA
22 CB
Device ModBus
address
Function
code
Number of bytes
returned
Analog-data input
value
CRC check code
Modbus TCP protocol read analog-data input:
Send
00 01
00 00
00 06
01
04
00 13
00 01
Transmiss
ion
identifier
Protocol
identifier
Length
Unit
identifier
Functio
n code
Analog-data start
address
Read the number
of addresses
Receive
00 01
00 00
00 05
01
04
02
26 DA
Transmiss
ion
identifier
Protocol
identifier
Length
Unit
identifier
Functio
n code
Number of bytes
returned
Analog-data input
value
4.2.2 Analog AI acquisition range setting
When the value of register 0x40084 (0x0053) is 0, the analog input range is 0 - 20mA;
When the value of register 0x40084 (0x0053) is 1, the analog input range is 4 - 20mA;
Note: When the range is 4-20mA, the input current is <4mA, the register value will be 0.
4.3 Network related functions
4.3.1 Device MAC address reading
Modbus RTU protocol write register:
Send
01
03
00 61
00 03
54 15
Device ModBus
address
Function
code
Start address
Read number of
registers
CRC check code
Receive
01
03
06
1A 00 1C C0 BB FF
16 53
Device ModBus
address
Function
code
Number of
bytes
Read value
CRC check code
Modbus TCP protocol write register:
Send
00 01
00 00
00 06
01
03
00 61
00 03
Transmissio
Protocol
Length
Unit
Functio
Address
Write value