Page 1
C h e n g d u E b y t e E l e c t r o n i c T e c h n o l o g y C o . , L t d E 8 2 1 - R T U
E821-RTU(0400-ETH) User Manual
( 0 4 0 0 - E T H ) U s e r M a n u a l
Page 2
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
Contents
Features...................................................................................................................................................................................3
1. Quick start...........................................................................................................................................................................4
1.1 Port Connection........................................................................................................................................................4
1.1.1 RS485 connection......................................................................................................................................... 4
1.1.2 Analog input connection............................................................................................................................... 4
1.2 Basic operation......................................................................................................................................................... 5
1.2.1 RS485 Bus control........................................................................................................................................ 5
1.2.2 Ethernet control.............................................................................................................................................7
2. Product description............................................................................................................................................................. 9
2.1 Basic parameters...................................................................................................................................................... 9
2.2 Size and Interface description................................................................................................................................ 10
2.3 Reset button description......................................................................................................................................... 12
3. Modbus............................................................................................................................................................................. 13
3.1 Register Address Table................................................................................................................................................... 13
3.2 Modbus address table..................................................................................................................................................... 14
3.3 RS485 serial port baud rate code value table..................................................................................................................14
3.4 RS485 serial port parity bit value table.......................................................................................................................... 14
3.5 Configure parameters by setting software...................................................................................................................... 15
4. Product Function...............................................................................................................................................................16
4.1 Working mode................................................................................................................................................................ 16
4.1.1 Slave mode..................................................................................................................................................16
4.1.2 Master mode................................................................................................................................................16
4.2 RTU basic function......................................................................................................................................................... 17
4.2.1 Read analog-data AI input.......................................................................................................................... 17
4.2.2 Analog AI acquisition range setting........................................................................................................... 18
4.3 Network related functions...............................................................................................................................................18
4.3.1 Device MAC address reading..................................................................................................................... 18
4.3.2 Device SN code reading..............................................................................................................................19
4.3.3 Network function parameter validation command (Ethernet restart command)........................................ 19
4.3.4 WAN port IP info configuration................................................................................................................. 20
4.3.5 Set DNS...................................................................................................................................................... 20
4.3.6 Set network protocol parameters................................................................................................................ 21
4.3.7 Set the registration package mode.............................................................................................................. 22
4.3.8 Set the registration package contents..........................................................................................................22
4.3.9 Set heartbeat package mode........................................................................................................................23
4.3.10 Set heartbeat package content...................................................................................................................24
4.3.11 Set heartbeat package time........................................................................................................................24
4.3.12 Clear the cache.......................................................................................................................................... 25
4.3.13 Set keep-alive parameters......................................................................................................................... 25
4.3.14 Set local port number................................................................................................................................ 26
4.3.15 Set cloud transparent transmission function............................................................................................. 27
4.3.16 Set timeout restart time............................................................................................................................. 27
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Page 3
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
Important Statement..............................................................................................................................................................28
Reversion History................................................................................................................................................................. 28
About Us...............................................................................................................................................................................28
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Page 4
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
Features
Support 4 analog inputs, default current acquisition;
Support Ethernet port, you can use socket to connect to remote server, support TCP/UDP;
Support Modbus TCP/RTU protocol;
Support Ebyte Cloud, can be controlled by commands;
Support 2 working modes, master mode and slave mode, slave can cascade multiple devices by RS485;
Support Reload touch button, long press for 5s, Modbus device address, RS485 serial port baud rate and check digit
will restore factory settings;
Hardware watchdog with high reliability;
Multiple indicators to show device working status;
The power supply has static and surge level 3 protection, and has over-current, over-voltage, anti-reverse and other
protections.
Note: Support customization of functions, such as conditional control (how to output based on input state)
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Page 5
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
1. Quick start
This chapter is a quick introduction to E821-RTU (0400-ETH). It is recommended that users carefully read this
chapter and follow the instructions before using the product. It will have a systematic understanding of the product, and
users can also choose the one you are interested in according to your needs. For specific details and instructions, please
refer to the following sections.
1.1 Port Connection
1.1.1 RS485 connection
The E821-RTU device has a master-slave mode and can be cascaded by the RS485 port.
Note: 120R (matching resistor) is added and not added according to the actual line matching (default is not added).
1.1.2 Analog input connection
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Page 6
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
1.2 Basic operation
Connection: The computer connects to E821-RTU (0400-ETH) by USB to RS485 cable or the computer connects to
E821-RTU (0400-ETH) by Ethernet cable.
Power supply: E821-RTU (0400-ETH) working voltage is DC 8~28V, and the power supply has at least 0.2A power
supply capability.E821-RTU(0400-ETH).
1.2.1 RS485 Bus control
Select the device model, port number, set the baud rate check, and click “Search” to search for the device.
After searching for the actual connected device, click “Stop”; the number of connected devices in the example is 1.
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Page 7
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
At this time, you can see the address of the current device, check "Auto Refresh" to perform analog input reading.
The example shows that channel 4 has 10mA current input.
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Page 8
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
1.2.2 Ethernet control
Click the parameter setting and parameter reading, we can see that the device address is "1", in "slave mode", the
local IP is "192.168.4.101", the subnet mask is "255.255.255.0", the role is "TCP server", and the port number is 8666.
Click Local connection, set the computer IP: "192.168.4.10", subnet mask: "255.255.255.0", gateway: 192.168.4.1.
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Page 9
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
Open the network debugging assistant, set the port number and other parameters, click the connection, you can find
that the device LINK light is on to indicate the connection is successful.
Send Modbus command: 01 03 00 10 00 04 45 CC, to read the current value collected by 4 analog channels.
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Page 10
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
IP, TCP/UDP, ARP, ICMP, IPV4
8V~28V, 8V/143mA, 12V/98mA, 24V/52mA,
28V/45mA
Current acquisition range
RS485: 1200~115200bps, RJ45: 100M
2. Product description
E821-RTU (0400-ETH) is a data acquisition product which supports four analog (current) inputs and supports
Modbus TCP/RTU protocol. The product is highly easy to use and can be easily and quickly integrated into your system
for remote network-based data acquisition.
2.1 Basic parameters
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Page 11
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
2.2 Size and Interface description
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Page 12
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
tandard RJ45 interface, connected to device or PC
Power input, DC 8V~28V, 12V/24V recommended
Crimping terminal
power input positive
Power input, DC 8V~28V, 12V/24V recommended
Crimping terminal
power input negative
Signal ground, can not be connected
RS485 B is connected to device A
RS485 B is connected to device B
Long Press for 5S effective
Analog signal input
channel 1 positive
Analog signal input channel, used in combination
with the negative to collect analog data
Analog signal input
channel 1 negative
Analog signal input channel, used in combination
with the positive to collect analog data
Analog signal input
channel 2 positive
Analog signal input channel, used in combination
with the negative to collect analog data
Analog signal input
channel 2 negative
Analog signal input channel, used in combination
with the positive to collect analog data
Analog signal input
channel 3 positive
Analog signal input channel, used in combination
with the negative to collect analog data
Analog signal input
channel 3 negative
Analog signal input channel, used in combination
with the positive to collect analog data
Analog signal input
channel 4 positive
Analog signal input channel, used in combination
with the negative to collect analog data
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Page 13
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
Analog signal input
channel 4 negative
Analog signal input channel, used in combination
with the positive to collect analog data
Red after power on, long bright
Ethernet connection
indication
Blue and green two-color LED, the blue LED is long
bright after the Ethernet port TCP/UDP connection is
successful. After power-on, the green LED is lit,
indicating that it is initializing.
Data indication/reset
indication
Blue and green two-color LED, blue LED flashes
when data is transmitted and received, green LED
flashes 3 times after reset
Note: It is recommended to connect the case to the ground..
2.3 Reset button description
Long press for 5S is valid. After the reset is successful, the RST LED flashes 3 times, the Modbus device address,
RS485 serial port baud rate and parity bit are restored to the factory settings, other configuration parameters are
unchanged.
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Page 14
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
Register Address Table (Function table: 0x03H, 0x04H, 0x06H, 0x10H)
Master mode or
slave mode
Static
192.168.4.101
255.255.255.0
192.168.4.1
Set Network protocol
parameters
Set registration
package mode
“0” Close the
registration
package
Set registration
package content
Set heartbeat
package content
Set heartbeat
package mode
“0” Network
heartbeat
package
Do not clear
the cache data
of the
SOCKET A1
link
Set keep-alive
parameters
Detection time:
10s, Detection
interval: 5s,
Detection
times: 30
3. Modbus
3.1 Register Address Table
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Page 15
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
Set cloud
transmission
function
Baud rate code value table
3.2 Modbus address table
3.3 RS485 serial port baud rate code value table
3.4 RS485 serial port parity bit value table
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Page 16
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
3.5 Configure parameters by setting software
Select the “Parameter Setting” column to read parameters and write parameters. For specific functions, please refer
to the product function description below.
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Page 17
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
4. Product Function
4.1 Working mode
The working mode has master mode and slave mode, which are configured by Modbus register 40081 (0x0050).
When the register value is 0, it is the master mode; when the register value is 1, it is the slave mode, and default is the
slave mode.
4.1.1 Slave mode
In slave mode (register value is 0x01), the data sent to the device by network or 485 bus (sender) conforms to
Modbus RTU or Modbus TCP protocols, and the address in the data is the device address. The device will respond to the
sender with the same protocol. If the data sent to the device by the network end or 485 bus end does not conform to the
Modbus RTU or Modbus TCP protocol, or meets the Modbus RTU or Modbus TCP protocol, but the data address is
different from that of the device, the data will be discarded.
In the slave mode, the device can directly connect to the device in master mode through the 485 bus. When the slave
is not connected to the network, the network can also access the data of the slave through the master.
4.1.2 Master mode
In slave mode (register value is 0x00), the data sent to the device by network or 485 bus (sender) conforms to
Modbus RTU or Modbus TCP protocols, and the address in the data is the device address. The device will respond to the
sender with the same protocol. If the data sent to the device by the network end or 485 bus end does not conform to the
Modbus RTU or Modbus TCP protocol, or meets the Modbus RTU or Modbus TCP protocol, but the data address is
different from that of the device, the data of 485 bus will be transmitted to the network, and the data on the network will
be transmitted to 485 bus.
This function of host mode can realize the cascade function of devices and the data transmission between 485 bus
and network.
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Page 18
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
Analog-data start
address
Read the number of
addresses
Analog-data start
address
Read the number
of addresses
4.2 RTU basic function
4.2.1 Read analog-data AI input
Function code: 03, Read hold-register; 04, Read input-register
Address range: 30017(0x0010)~30020(0x0013)
Remark: The unit of analog input value is uA
E.g.:
Function code 0x03, read AI1 input, assuming AI1 input is 9946uA, the corresponding value should be 0x26 DA
Modbus RTU protocol read analog-data input:
Modbus TCP protocol read analog-data input:
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Page 19
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
Analog-data start
address
Read the number of
addresses
Analog-data start
address
Read the number
of addresses
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:
Modbus TCP protocol read analog-data input:
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:
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Modbus TCP protocol write register:
Page 20
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
030819 05 21 14 00 13 55 50
Note: 1A 00 1C C0 BB FF is the MAC address of the device, the device has a unique MAC address.
4.3.2 Device SN code reading
Modbus RTU protocol read register:
Modbus TCP protocol read register:
Note: 19 05 21 14 00 13 55 50 is the device SN code, the devices have different SN codes.
4.3.3 Network function parameter validation command (Ethernet restart command)
Modbus RTU protocol write register:
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Modbus TCP protocol write register:
Page 21
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
00 00 C0 A8 04 65 FF FF FF 00 C0 A8 04
01
00 00 C0 A8 04 65 FF
FF FF 00 C0 A8 04 01
Special note: You can restart the Ethernet component by writing the value 0X00 01 to the address 0X00 67. After
the Ethernet parameters have been configured, you have to execute the restart command. Otherwise, the configured
parameters will not take effect.
4.3.4 WAN port IP info configuration
Modbus RTU protocol write WAN port IP register:
Modbus TCP protocol write register:
Note: 00 00 is static mode, 00 01 is dynamic mode, C0 A8 04 65 ( 192.168.4.101 ) is IP address. FF FF FF 00
( 255.255.255.0) is subnet mask. C0 A8 04 01( 192.168.4.1) is gateway addres. When set to dynamic mode, the IP
address, subnet mask, and gateway address are required for the format. The IP address of the device needs to be obtained
through the query command.
4.3.5 Set DNS
Modbus RTU protocol write DNS register:
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Page 22
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
Modbus TCP protocol write register:
Note: 3D 8B 02 45 is preferred DNS server address, C0 A8 04 02 is Alternate DNS server address.
4.3.6 Set network protocol parameters
Modbus RTU protocol write DNS register:
Modbus TCP protocol write register:
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Page 23
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
00 28 41 42 43 68 23 67 AA 00
2A 00 30 00 00 00 00 00 00 00 00
00 00 00 00 11 00 22 00 33 00 44 00
12 33 23 11 10 1D 1C BB AA
Note: 00 00 isTCP serve, 00 01 is TCP client, 00 02 is UDP server, 00 03 is UDP client. C0 A8 04 0A is the IP
address or domain name of the target server when it is set to "client", 22 B6 is port number, it is local port number when
in server mode, it is remote port number when in client mode.
4.3.7 Set the registration package mode
Modbus RTU protocol write register:
Modbus TCP protocol write register:
Note: 00 00 means disable the registration package mechanism, 00 01 means that only one user-defined registration
package is sent when the first link to the server, 00 02 means that only a registration packet of 6-byte MAC is sent when
the first link to the server, 00 03 means adding custom packet data before each packet sent to the server. 00 04 means
adding 6 bytes of MAC as registration packet data before each packet sent to the server.
4.3.8 Set the registration package contents
Modbus RTU protocol write register:
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Page 24
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
00 28 41 42 43 68 23
67 AA 00 2A 00 30 00
00 00 00 00 00 00 00
00 00 00 00 11 00 22
00 33 00 44 00 12 33
23 11 10 1D 1C BB AA
Modbus TCP protocol write register:
Note: 00 indicatess HEX, 01 indicates ASCII. 28 indicates the content length of the registration package. 41 42 43
68 23 67 AA 00 2A 00 30 00 00 00 00 00 00 00 00 00 00 00 00 11 00 22 00 33 00 44 00 12 33 23 11 10 1D 1C BB AA
indicates the contents of the registration package. For example: send the registration package content: ebyte, the write
value is 01 05 65 62 79 74 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00.
4.3.9 Set heartbeat package mode
Modbus RTU protocol write register:
Modbus TCP protocol write register:
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Page 25
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
00 28 41 42 43 68 23
67 AA 00 2A 00 30 00
00 00 00 00 00 00 00
00 00 00 00 11 00 22
00 33 00 44 00 12 33
23 11 10 1D 1C 1B 1A
Transm
ission
identifi
er
00 28 41 42 43 68 23 67 AA 00
2A 00 30 00 00 00 00 00 00 00 00
00 00 00 00 11 00 22 00 33 00 44
00 12 33 23 11 10 1D 1C 1B 1A
Note: 00 00 is network heartbeat package, 00 01 is serial port heartbeat package.
4.3.10 Set heartbeat package content
Modbus RTU protocol write register:
Modbus TCP protocol write register:
Note: 00 is HEX, 01 is ASCII. 28 is the content length of the heartbeat packet. 41 42 43 68 23 67 AA 00 2A 00 30
00 00 00 00 00 00 00 00 00 00 00 00 11 00 22 00 33 00 44 00 12 33 23 11 10 1D 1C 1B 1A is heartbeat package content.
For example: send the heartbeat package content: ebyte, the write value is 01 05 65 62 79 74 65 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
4.3.11 Set heartbeat package time
Modbus RTU protocol write register:
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Page 26
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
Modbus TCP protocol write register:
Note: 00 00 is the heartbeat packet time. 00 00 means to turn off the heartbeat packet, the value cannot be 1, and the
range is 2-65535.
4.3.12 Clear the cache
Modbus RTU protocol write register:
Modbus TCP protocol write register:
Note: 00 00 indicates that the cached data of the SOCKET A1 link is not cleared. 00 01 indicates that the cached
data of the SOCKET A1 link is cleared, but the serial cache data is not cleared.
4.3.13 Set keep-alive parameters
Modbus RTU protocol write register:
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Page 27
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
Modbus TCP protocol write register:
Note: 02 D1 indicates that if there is no data message transmission after the TCP link, the detection message will be
started. 00 00 indicates that the keep-alive function is turned off, with a value of 2-7200 seconds. 02 D1 time interval
between the previous detection message and the next detection message is a value of 2-7200 seconds. 00 31 is the
maximum number of detection failures. When the number of sniffing failures reaches this number, the TCP connection
will be disconnected, with a value of 2-255 times.
4.3.14 Set local port number
Modbus RTU protocol write register:
Modbus TCP protocol write register:
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Page 28
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
Note: 11 A1 indicates the A1 local port, 00 00 indicates a random port with a value of 1-65535.
4.3.15 Set cloud transparent transmission function
Modbus RTU protocol write register:
Modbus TCP protocol write register:
Note: 00 00 mens cloud transmission function is off, 00 01 means on.
4.3.16 Set timeout restart time
Modbus RTU protocol write register:
Modbus TCP protocol write register:
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd
Page 29
Chengdu Ebyte Electronic Technology Co.,Ltd E821-RTU (0400-ETH)User Manual
Note: FF A0 indicates the restart time, the value is 60-65535. This feature is used to reset the Ethernet if the
Ethernet has not received any data for a long time.
Important Statement
All rights to interpret and modify this manual belong to Ebyte.
This manual will be updated based on the upgrade of firmware and hardware, please refer to the latest version.
Please refer to our website for new product information.
Reversion History
About Us
Technical support: support@cdebyte.com;
Documents and RF Setting download link: www.ebyte.com
Tel: +86-28-61399028 Ext. 812
Fax: 028-64146160
Web: www.ebyte.com
Address:Innovation Center B333-D347, 4# XI-XIN Road,Chengdu, Sichuan, China
Copyright ©2012–2019, Chengdu Ebyte Electronic Technology Co.,Ltd