Ebyte ME31-XAXX0600 User manual

ME31-XAXX0600
I/O Networking Module

Chengdu Ebyte Electronic Technology Co.,Ltd ME31-XAXX0600_UserManual_CN
Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd
I
Contents
1. Product overview ........................................................................................................................................................1
1.1 Introduction ...................................................................................................................................................... 1
1.2 Features .............................................................................................................................................................1
1.3 Application typology diagram ..........................................................................................................................2
2. Quick start ...................................................................................................................................................................3
2.1 Devices required ...............................................................................................................................................3
2.2 Device connection ............................................................................................................................................ 3
2.2.1 AI analog input connection ................................................................................................................... 4
2.2.2 Simple use ............................................................................................................................................. 4
2.3 Parameter configuration ................................................................................................................................... 4
2.4 Control test ....................................................................................................................................................... 5
2.4.1 Modbus TCP Control ............................................................................................................................ 5
2.4.2 Modbus RTU Control ............................................................................................................................6
3 Technical indicator ...................................................................................................................................................... 8
3.1Specification and parameter ..............................................................................................................................8
3.2 Device default parameter ................................................................................................................................. 8
3.3 Dimensions .....................................................................................................................................................10
3.4 Ports and indicators ........................................................................................................................................ 11
4 Product function introduction ....................................................................................................................................13
1.4 4.AI input ........................................................................................................................................................13
1.4.1. Analog quantity range ........................................................................................................................ 13
1.4.2. Trigger mode ...................................................................................................................................... 13
1.4.3. Analog input engineering quantity shaping value and engineering quantity floating point value ....14
1.4.4. AI Filtering parameters ...................................................................................................................... 14
4.2 Modbus gateway .............................................................................................................................................14
4.2.1 Modbus TCP/RTU Protocol Conversion ............................................................................................ 14
4.2.2 Modbus address filtering .....................................................................................................................15
4.2.3 Modbus TCP protocol data frame description .................................................................................... 15
4.2.4 Modbus RTU protocol data frame description ................................................................................... 15
4.3 Active upload ..................................................................................................................................................15
4.4Custom Module Information ...........................................................................................................................16
4.4.1 Modbus address ...................................................................................................................................16
4.4.2 Module name .......................................................................................................................................16
4.4.3 Network parameter ..............................................................................................................................16
4.4.4 UART parameter ................................................................................................................................. 17
4.5 OLED display and parameter configuration .................................................................................................. 17
4.5.1 Information display interface .............................................................................................................. 17
4.5.2 Device parameter display interface .....................................................................................................18
4.5.3 Device parameter configuration interface ...........................................................................................18
4.5.4 Screen sleep .........................................................................................................................................19
4.6MODBUS parameter setting ........................................................................................................................... 19
4.6.1 DI register list ......................................................................................................................................19
4.6.2 Module related register ....................................................................................................................... 20

Chengdu Ebyte Electronic Technology Co.,Ltd ME31-XAXX0600_UserManual_CN
Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd
II
4.6.3 Network related register ......................................................................................................................20
4.6.4 Modbus command operation ...............................................................................................................21
5 Host computer ........................................................................................................................................................... 24
5.1 Acquisition and control .................................................................................................................................. 24
5.2 Parameter Configuration Interface .................................................................................................................25
Revision history ............................................................................................................................................................27

Chengdu Ebyte Electronic Technology Co.,Ltd ME31-XAXX0600_UserManual_CN
Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd
1
1. Product overview
1.1 Introduction
ME31-XAXX0600 features 6 channel analog (0-20mA/4-20mA)
input,supports Modbus TCP protocol or Modbus RTU protocol for
acquisition and control and can be used as a simple Modbus gateway
(automatically send commands with non-local Modbus addresses through
the serial port/network port).
1.2 Features
Good for standard Modbus RTU protocol and MODBUS TCP protocol;
Work with various configuration software/PLC/touch screen;
RS485 acquisition control I/O;
RJ45 acquisition control I/O,support 4 channel master access;
Support OLED display screen to display status information, and device parameters can be configured through
buttons;
6 channel analog (0-20mA/4-20mA)input;
Support custom Modbus address settings;
Support 8 common baud rate configurations ;
DHCP and static IP;
DNS function, domain name analysis;
Support Modbus gateway;

Chengdu Ebyte Electronic Technology Co.,Ltd ME31-XAXX0600_UserManual_CN
Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd
2
1.3 Application typology diagram
Network port application topology
Serial port application topology

Chengdu Ebyte Electronic Technology Co.,Ltd ME31-XAXX0600_UserManual_CN
Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd
3
2. Quick start
Note: The test need to carry out with factory parameter.
2.1 Devices required
ME31-XAXX0600
12V SMPS
USB to RS485
Computer
RJ45 Cable
More cables
2.2 Device connection
2.2.1 RS485 connection
Note: When the 485 bus high frequency signal is transmitted, the signal wavelength is shorter than the transmission
line, and the signal will form a reflected wave at the end of the transmission line, which will interfere with the

Chengdu Ebyte Electronic Technology Co.,Ltd ME31-XAXX0600_UserManual_CN
Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd
4
original signal. Therefore, a terminal resistance must be added at the end of the transmission line to prevent the
signal from being reflected after reaching the end of the transmission line. The terminal resistance should be the
same as the impedance of the communication cable, with a typical value of 120 ohms. Its function is to match the
bus impedance and improve the anti-interference and reliability of data communication.
2.2.1 AI analog input connection
2.2.2 Simple use
Wiring: The computer is connected to the RS485 interface of ME31-XAXX0600 through USB to RS485, A is connected to A, B is connected to B.
Networking: Insert the network cable into the RJ45 port and connect to the PC.
Power supply: Use DC-12V switching power supply (DC 8~28V) to supply power to ME31-XAXX0600.
2.3 Parameter configuration
Step 1: Modify the IP address of the computer to be consistent with the device. Here it is modified to 192.168.3.100
to ensure the same network segment as the device and that the IP is different. Please turn off the firewall and try
again if the step failed;

Chengdu Ebyte Electronic Technology Co.,Ltd ME31-XAXX0600_UserManual_CN
Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd
5
Step 2: Open the network assistant, select the TCP client, enter the remote host IP192.168.3.7 (default parameters),
enter the port number 502 (default parameters), and select HEX to send.
2.4 Control test
2.4.1 Modbus TCP Control
Use network assistant to read l ME31-XAXX0600, collected first channel AI data.

Chengdu Ebyte Electronic Technology Co.,Ltd ME31-XAXX0600_UserManual_CN
Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd
6
Please note that unit of read value is uA.
To test other function according to below table
Function (function code)
Command
Read AI first channel
collected value(0x04)
00 1D 00 00 00 06 01 04 00 64 00
01
Read AI all collected value
(0x04)
00 1F 00 00 00 06 01 04 00 64 00
06
2.4.2 Modbus RTU Control
Use network assistant to readl ME31-XAXX0600, first channel AI collected data.
To test other function according to below table

Chengdu Ebyte Electronic Technology Co.,Ltd ME31-XAXX0600_UserManual_CN
Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd
7
Function (function code)
Command
Read AI first channel
collected value(0x04)
01 02 04 00 64 00 00 08
79 CC01 70 15
Read AI all collected value
(0x04)
01 04 00 64 00 06 31 D7

Chengdu Ebyte Electronic Technology Co.,Ltd ME31-XAXX0600_UserManual_CN
Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd
8
3 Technical indicator
3.1Specification and parameter
Category
Name
Parameter
Power supply
Operating voltage
DC8~28V
Power indicator
Blue LED indicator
Serial port
Communication
interface
RJ45、RS485
Baud rate
9600bps(can be defined by user)
Communication
protocol
Standard Modbus TCP,Modbus RTU
MODBUS
Device address
Modify via Modbus command and computer
AI input
AI channels
6 channel
Acquisition
properties
Single end input
Input type
0-20mA、4-20mA
AI resolution
3‰
Acquisition
frequency
10 Hz
Input indicator
OLED display
Others
Product size
121mm * 72mm * 34mm
Product weight
135 ±5 g
Working
temperature and
humidity
-40 ~+85℃、5% ~95%RH(no
condensation )
Storage
temperature and
humidity
-40 ~+105℃、5% ~95%RH(no
condensation )
Installation
Din rail installation
3.2 Device default parameter
Category
Name
Parameter
Ethernet parameter
Working mode
TCP server (Max 4 channel client
access)
Local IP
192.168.3.7

Chengdu Ebyte Electronic Technology Co.,Ltd ME31-XAXX0600_UserManual_CN
Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd
9
Local port
502
Subnet mask
255.255.255.0
Gateway address
192.168.3.1
DHCP
Off
Local MAC
Depending on chip(fixed)
Target IP
192.168.3.3
Target port
502
DNS server
114.114.114.114
Active upload
Off
UART parameter
Baud rate
9600bps(8 type)
Check method
None(default)、Odd、Even
Data bit
8
Stop bit
1
MODBUS parameter
Modbus master slave
Slave
Address
1

Chengdu Ebyte Electronic Technology Co.,Ltd ME31-XAXX0600_UserManual_CN
Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd
10
3.3 Dimensions

Chengdu Ebyte Electronic Technology Co.,Ltd ME31-XAXX0600_UserManual_CN
Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd
11
3.4 Ports and indicators
No.
Sticker
Remarks
1
TX(LED)
UART TX data
2
RX(LED)
UART RX data
3
LINK(LED)
Network link
4
NET(LED)
Network data TX and RX
5
PWR(LED)
Power input
6
GND
Negative pole of power input terminal, DC 8V~28V, 5.08mm Phoenix terminal.
7
VCC
Positive pole of power input terminal, DC 8V~28V, 5.08mm Phoenix terminal.
8
AI3
Analog input channel 3, supporting 0 to 20mA current input, 5.08mm Phoenix
terminal.
9
GND
Channel 3 analog input ground, 5.08mm Phoenix terminal.
10
AI4
Analog input channel 4, supporting 0 to 20mA current input, 5.08mm Phoenix
terminal.
11
GND
Channel 4 analog input ground, 5.08mm Phoenix terminal.
12
AI5
Analog input channel 5, supporting 0 to 20mA current input, 5.08mm Phoenix
terminal.
13
GND
Channel 5 analog input ground, 5.08mm Phoenix terminal.

Chengdu Ebyte Electronic Technology Co.,Ltd ME31-XAXX0600_UserManual_CN
Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd
12
14
AI6
Analog input channel 6, supporting 0 to 20mA current input, 5.08mm Phoenix
terminal.
15
GND
Channel 6 analog input ground, 5.08mm Phoenix terminal.
16
Ethernet
Ethernet interface, standard RJ45 interface.
17
GND
Channel 2 analog input ground, 5.08mm Phoenix terminal.
18
AI2
Analog input channel 2, supporting 0 to 20mA current input, 5.08mm Phoenix
terminal.
19
GND
Channel 1 analog input ground, 5.08mm Phoenix terminal.
20
AI1
Analog input channel 1, supporting 0 to 20mA current input, 5.08mm Phoenix
terminal.
21
GND
RS485 GND
22
485-A
The serial port A is connected to the external device A interface, with a 5.08mm
Phoenix terminal.
23
485-B
The serial port B is connected to the external device B interface, with a 5.08mm
Phoenix terminal.

Chengdu Ebyte Electronic Technology Co.,Ltd ME31-XAXX0600_UserManual_CN
Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd
13
4 Product function introduction
1.4 4.AI input
1.4.1. Analog quantity range
Analog input AI measurement current signal, with a collection range of 0-20mA or 4-20mA, an accuracy of
3‰, and a resolution of 12 bits. Adopting single ended input, sampling frequency 10Hz, input impedance 100 Ω.
Set the sampling range for all AI channels, with valid values of 1 and 0 (default 0).
Configuration is 0: represents 0-20mA
Configuration is 1: represents 4-20mA
[Note] AI Configuration Description
(1) The AI sampling range for each channel can be set. When the AI channel sampling range is configured to
4-20mA sampling, 0 is displayed if the current signal is below 3.5mA, and 4 is displayed if it is above 3.5mA and
below 4mA. There is no conversion limit for signals greater than 20mA, but it cannot exceed 25mA (exceeding
25mA may pose a risk of equipment damage).
(2) The starting address of the AI channel sampling range parameter is 0x04B2, the register type is holding
register, and the function codes are 0x06 and 0x10. When writing the AI channel sampling range parameter, if the
written parameter value is not within the range of 0-1, the closest value will be automatically taken for writing. If
the writing sampling range parameter is 2, the device takes 1 as the sampling range parameter, and Modbus does
not return an error command.
1.4.2. Trigger mode
(1) Not triggered: mode off.
(2) Rising trigger: When the AI input value becomes greater than the set AI trigger high value, the AI trigger
becomes high (i.e. the output state is 1), generating a rising edge trigger. After triggering, as long as the AI value is
not lower than the set AI trigger low value, the current output value remains 1 (can be combined with DO linkage).
(3) Descending trigger: When the AI input value becomes less than the set AI trigger low value, the AI trigger
becomes low (i.e. the output state is 0), generating a falling edge trigger. After triggering, as long as the AI value is
not higher than the set AI trigger high value, the current output value remains 0 (can be combined with DO
linkage).
(4) Bilateral trigger: When the AI input value becomes greater than the set AI trigger high value, the AI trigger
becomes high (i.e. the output state is 1), generating a rising edge trigger. After triggering, as long as the AI value is
not lower than the set AI trigger low value, the current output value remains 1; When the AI input value becomes
less than the set AI trigger low value, the AI trigger becomes low (i.e. the output state is 0), generating a falling
edge trigger. After triggering, as long as the AI value is not higher than the set AI trigger high value, the current
output value remains 0 (can be combined with DO linkage).

Chengdu Ebyte Electronic Technology Co.,Ltd ME31-XAXX0600_UserManual_CN
Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd
14
1.4.3. Analog input engineering quantity shaping value and engineering quantity
floating point value
There are two ways to read the current signal size collected by the device:
(1) Read the AI engineering quantity shaping value and directly convert it to obtain the input current. The
starting address of the AI engineering quantity shaping value register is 0x0064, the register type is input register,
and the read function code is 0x04. This method returns a register representing one channel and reads values
ranging from 0 to 25000. The method for calculating the current size is 0-25000 corresponding to 0-25A. Namely:
Current=engineering quantity value/1000 (mA)
(2) Read the floating point value of AI engineering quantity, and use IEE754 conversion tool to convert
hexadecimal data to Floating-point arithmetic to get the input current. The starting address of the AI engineering
quantity shaping value register is 0x00C8, the register type is input register, and the read function code is 0x04.
This method returns two registers representing one channel.
1.4.4. AI Filtering parameters
The filtering parameters of the AI channel can be set, with valid values ranging from 1 to 16 and a default
value of 6.
Filter parameter description:
(1) All AI channels share a common filtering parameter, and the higher the parameter value, the more stable
the output value, and the slower the response.
(2) The AI channel filtering parameter address is 0x04B0, and the register type is a holding register. Function
codes 0x06 and 0x10.
(3) When writing AI filtering parameters, if the parameter values written are not within the range of 1-16, the
closest value will be automatically taken for writing. If the filtering parameter is written as 0, the device will take 1
as the filtering parameter, and Modbus will not return error instructions.
4.2 Modbus gateway
The device can transmit non local Modbus instructions from the network/serial port to the serial port/network,
and the local Modbus instructions can be executed directly.
4.2.1 Modbus TCP/RTU Protocol Conversion
After being turned on, the Modbus TCP data on the network side will be converted into Modbus RTU data.

Chengdu Ebyte Electronic Technology Co.,Ltd ME31-XAXX0600_UserManual_CN
Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd
15
4.2.2 Modbus address filtering
This function can be used in certain host software or configuration screens as the host to access the device
serial port, and the gateway function of the device is used. When the slave is on the network side and the Modbus
TCP to RTU function is enabled, the presence of multiple slaves on the bus may cause data confusion. At this time,
enabling address filtering can ensure that only the specified address can pass through the device; When the
parameter is 0, data is transmitted through, and when the parameter is 1-255, data is only transmitted through the
set slave address.
4.2.3 Modbus TCP protocol data frame description
TCP frame format:
Transaction ID
Protocol ID
Length
Device Address
Function Code
Data Segment
2 Bit
2 Bit
N+2 Bit
1 Bit
1 Bit
N Bit
Transaction identification: It can be understood as the serial number of the message. Generally, 1 is added
after each communication to distinguish different communication data messages.
Protocol identifier: 00 00 means Modbus TCP protocol.
Length: Indicates the next data length, in bytes.
For example:get DI state
01 00
00 00
00 06
01
02
00 00 00 04
Transaction ID
Protocol ID
Length
Device Address
Function Code
Data Segment
4.2.4 Modbus RTU protocol data frame description
RTU frame format:
Device Address
Function Code
Data Segment
Check code CRC
1 Bit
1 Bit
N Bit
2 Bit
For example:get DI state command
01
02
00 00 00 04
79 C9
Device Modbus address
Function Code
Data Segment
CRC check code
4.3 Active upload
The device supports the function of uploading analog input values at fixed time intervals. Setting the value of

Chengdu Ebyte Electronic Technology Co.,Ltd ME31-XAXX0600_UserManual_CN
Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd
16
the corresponding register can control the interval time and whether to upload or not.
The device with digital input will actively upload once after connecting to the server successfully, and then the
digital input will be uploaded following the status change, and the device with analog input will report the status of
the analog input according to the configuration of the active upload time period (the configuration period is
1-65535 ).
When set to 0, the upload is closed, and when set to another positive integer value N, the upload is performed
at intervals of N seconds.
[Note] The device can only be valid if it is in the client mode configuration. If the register value is non-zero,
active uploading is enabled.
4.4Custom Module Information
4.4.1 Modbus address
The default address of the device is 1, and the address can be modified. The address range is 1-247.
4.4.2 Module name
Users can configure the device name for differentiation according to their own needs. It supports English and
digital formats, and the maximum length is 20 bytes.
4.4.3 Network parameter
Unless otherwise specified: The following network-related parameters default to IPV4-related
parameters.
(1) MAC of the device: the user can obtain it by reading the specified register, and this parameter cannot be
written.
(2) IP address: IP address of the device, readable and writable.
(3) Modbus TCP port: the port number of the device, readable and writable.
(4) Subnet mask: address mask, readable and writable.
(5) Gateway address: gateway.
(6)DHCP: Set the way the device obtains IP, static (0), dynamic (1).
(7)Target IP: When the device works in client mode, the target IP or domain name of the device connection.
(8)Target port: When the device works in client mode, the target port to which the device is connected.
(9)DNS server: When the device is in client mode, it resolves the server domain name.
(10)Module working mode: switch the working mode of the module. Server: The device is equivalent to a
server, waiting for the user's client to connect, and the maximum number of connections is 4. Client: The
device actively connects to the target IP and port set by the user.
(11)Active upload: When the secondary parameter is not 0 and the device is in the client mode, the discrete
input state of the device will be uploaded to the server after the initial connection or input changes, and the
analog input will be uploaded according to the configured time period.

Chengdu Ebyte Electronic Technology Co.,Ltd ME31-XAXX0600_UserManual_CN
Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd
17
4.4.4 UART parameter
Parameters for setting serial communication:
Default parameters:
Baud rate: 9600(03);
Data bits: 8bit;
Stop bit: 1bit;
Check digit: NONE(00);
(1) Baud rate:
Baud rate code value table
0x0000
1200
0x0001
2400
0x0002
4800
0x0003
(default)
9600
0x0004
19200
0x0005
38400
0x0006
57600
0x0007
115200
(2) Check digit:
Check digit
0x0000(默认)
NONE
0x0001
ODD
0x0002
EVEN
4.5 OLED display and parameter configuration
The display interface includes information display page ( AI input status) and parameter setting page (part
of parameters).
4.5.1 Information display interface
Including the AI input value display page, shortly press the left and right buttons to switch the interface
Table of contents
Other Ebyte I/O System manuals