Ebyte ME31-XAAX0440 User manual

Chengdu Ebyte Electronic Technology Co.,Ltd. ME31-XAAX0440_UserManul_EN
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd. 0
ME31-XAAX0440
Network I/O networking module

Chengdu Ebyte Electronic Technology Co.,Ltd. ME31-XAAX0440_UserManul_EN
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd. 1
Contents
Chapter 1 Introduction...........................................................................................................................................................1
1.1 Brief Introduction..................................................................................................................................................... 1
1.2 Features.....................................................................................................................................................................1
1.3 Product application topology diagram......................................................................................................................2
Chapter 2 Quick start.............................................................................................................................................................. 3
2.1 Preparation for use....................................................................................................................................................3
2.2 Device connection.................................................................................................................................................... 4
2.2.1 RS485 connection..........................................................................................................................................4
2.2.2 Analog input connection................................................................................................................................ 4
2.2.3 Relay output connection................................................................................................................................ 5
2.2.4 Simple to use..................................................................................................................................................5
2.3 Parameter configuration............................................................................................................................................5
2.4 Control test................................................................................................................................................................7
2.4.1 Modbus TCP control......................................................................................................................................7
2.4.2 Modbus RTU control..................................................................................................................................... 8
2.5 Host computer control.............................................................................................................................................. 8
Chapter 3 Technical index...................................................................................................................................................... 9
3.1 Specifications............................................................................................................................................................9
3.2 Device default parameters...................................................................................................................................... 10
3.3 Mechanical dimension drawing.............................................................................................................................. 10
3.4 Port description....................................................................................................................................................... 11
3.5 LED indicator description.......................................................................................................................................12
Chapter 4 Product function introduction.............................................................................................................................. 13
4.1 DO output mode..................................................................................................................................................... 13
4.1.1 Level output................................................................................................................................................. 13
4.1.2 Pulse output................................................................................................................................................. 13
4.1.3 Power-on state..............................................................................................................................................13
4.2 AI input mode......................................................................................................................................................... 13
4.2.1 Analog range................................................................................................................................................ 13
4.2.2 AI raw value and engineering value of analog input................................................................................... 14
4.2.3 Input filter parameters..................................................................................................................................14
4.2.4 Input calibration...........................................................................................................................................14
4.3 Modbus gateway.....................................................................................................................................................14
4.4 Active upload.......................................................................................................................................................... 15
4.5 Custom module information................................................................................................................................... 15
4.5.1 Modbus address........................................................................................................................................... 15
4.5.2 Module name............................................................................................................................................... 15
4.5.3 Network parameters.....................................................................................................................................15
4.5.4 Serial port parameters.................................................................................................................................. 16
4.6 LCD display and parameter configuration............................................................................................................. 16
4.6.1 Information display interface.......................................................................................................................16
4.6.2 Device parameter display interface..............................................................................................................17

Chengdu Ebyte Electronic Technology Co.,Ltd. ME31-XAAX0440_UserManul_EN
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd. 2
4.6.3 Parameter configuration...............................................................................................................................17
4.7 Modbus TCP protocol data frame description........................................................................................................ 18
4.8 Modbus RTU protocol data frame description....................................................................................................... 18
4.9 MODBUS parameter configuration........................................................................................................................19
4.9.1 DO related registers..................................................................................................................................... 19
4.9.2 AI register list.............................................................................................................................................. 19
4.9.3 Module related registers.............................................................................................................................. 20
4.9.4 Network related registers............................................................................................................................. 21
4.9.5 Modbus instruction operation instructions.................................................................................................. 22
Chapter 5 Host computer...................................................................................................................................................... 24
5.1 Acquisition and control...........................................................................................................................................24
5.2 Parameter configuration..........................................................................................................................................25
Chapter 6 About customization............................................................................................................................................ 27
Revision history.................................................................................................................................................................... 28
About us................................................................................................................................................................................28

Chengdu Ebyte Electronic Technology Co.,Ltd. ME31-XAAX0440_UserManul_EN
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd. 1
Chapter 1 Introduction
1.1 Brief Introduction
ME31-XAAX0440 has 4 Type A relay outputs and 4 analog (0-20mA/4-20mA) inputs,
supports Modbus TCP protocol or Modbus RTU protocol for acquisition and control, and
the device can also be used as a simple Modbus gateway (Automatically send commands
of non-local Modbus addresses through the serial port/network port) network I/O
networking module.
1.2 Features
Support standard Modbus RTU protocol and Modbus TCP protocol;
Support various configuration software/PLC/touch screen;
RS485 acquisition and control I/O;
RJ45 acquisition and control I/O;
4 analog inputs (0-20mA/4-20mA);
4-way switch output DO (type A relay);
Switch output (DO) supports level mode and pulse mode;
Support custom Modbus address setting;
Support 8 common baud rate configurations;
Support DHCP and static IP;
Support DNS function, domain name resolution;

Chengdu Ebyte Electronic Technology Co.,Ltd. ME31-XAAX0440_UserManul_EN
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd. 2
1.3 Product application topology diagram
Modbus TCP application request topology:
Modbus RTU application request topology:

Chengdu Ebyte Electronic Technology Co.,Ltd. ME31-XAAX0440_UserManul_EN
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd. 3
Chapter 2 Quick start
[Note] This experiment needs to be performed by default factory parameters.
2.1 Preparation for use
The following table is the required materials for this test:
ME31-XAAX0440
12V Switching power supply
USB to RS485
Computer
One network cable
Several cables4

Chengdu Ebyte Electronic Technology Co.,Ltd. ME31-XAAX0440_UserManul_EN
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd. 4
2.2 Device connection
2.2.1 RS485 connection
[Note] When the RS485 bus high-frequency signal is transmitted, the signal wavelength is shorter than the transmission
line, and the signal will form a reflection wave at the end of the transmission line, which will interfere with the original
signal. Therefore, a terminal resistance must be added at the end of the transmission line to prevent the signal from
reflecting 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.2 Analog input connection

Chengdu Ebyte Electronic Technology Co.,Ltd. ME31-XAAX0440_UserManul_EN
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd. 5
2.2.3 Relay output connection
2.2.4 Simple to use
Wiring: The computer is connected to the RS485 interface of ME31-XAAX0440 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-XAAX0440.
2.3 Parameter configuration
Step 1: Modify the IP address of the computer to be consistent with the device, here I am modified to 192.168.3.100 to
ensure that it is in the same network segment as the device and that the IP is different;

Chengdu Ebyte Electronic Technology Co.,Ltd. ME31-XAAX0440_UserManul_EN
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd. 6
Step 2: Open the network assistant, select the TCP client, enter the remote host IP192.168.3.7 (default parameter), enter
the port number 502 (default parameter), and select HEX to send.

Chengdu Ebyte Electronic Technology Co.,Ltd. ME31-XAAX0440_UserManul_EN
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd. 7
2.4 Control test
2.4.1 Modbus TCP control
Use the network assistant to control the first DO output of ME31-XAAX0440.
You can test other functions through the commands in the following table.
Function (function code)
Instruction
Pull in the first coil (0x05)
01 00 00 00 00 06 01 05 00 00 FF 00
Full open command (0x0F)
02 00 00 00 00 08 01 0F 00 00 00 04 01 0F
Full close instruction (0x0F)
02 00 00 00 00 08 01 0F 00 00 00 04 01 00
Read all AI inputs (0x04)
01 00 00 00 00 06 01 04 00 64 00 04
Read all DO status (0x01)
01 00 00 00 00 06 01 01 00 00 00 04
The input register read by the demo case is engineering quantity (16-bit integer value, 32-bit floating point value
can also be obtained by reading 0x00C8 register)
Convert the value read from the input register to decimal, and compare it with the value displayed on the screen
after dividing by 1000.

Chengdu Ebyte Electronic Technology Co.,Ltd. ME31-XAAX0440_UserManul_EN
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd. 8
2.4.2 Modbus RTU control
Use the serial port assistant to control the first DO output of ME31-XAAX0440.
You can test other functions through the commands in the following table.
Function (function code)
Instruction
Pull in the first coil (0x05)
01 05 00 00 FF 00 8C 3A
Full open command (0x0F)
01 0F 00 00 00 04 01 0F 74 92
Full close instruction (0x0F)
01 0F 00 00 00 04 01 00 3E 96
Read all AI inputs (0x04)
01 04 00 64 00 04 B0 16
Read all DO status (0x01)
01 01 00 00 00 04 3D C9
2.5 Host computer control
For details, please refer to "Chapter 5 Host Computer".

Chengdu Ebyte Electronic Technology Co.,Ltd. ME31-XAAX0440_UserManul_EN
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd. 9
Chapter 3 Technical index
3.1 Specifications
Category
Name
Parameter
Power supply
Nominal Voltage
DC 8~28V
Power indicator
Blue LED indication
Serial port
Communication Interface
RJ45, RS485
Baud rate
9600bps (customizable)
Protocol
Modbus TCP, Modbus RTU
Modbus
Device address
The default value is 1 and can be changed
AI
(Analog input)
AI channels
4
Acquisition characteristics
Single-ended input
Input type
0-20mA、4-20mA
AI resolution
12 bits
Precision
3‰
Acquisition frequency
10Hz
Input instructions
LED screen display
DO
(Digital output)
Number of DO
4
DO output type
Type A relay
DO output mode
Level output, pulse output
Relay contact capacity
DC30V/7A、AC250V/7A
Output indication
Red LED indication
Other
Product Size
121mm * 72mm * 34mm (Length*width*height)
product weight
148 ± 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 method
Rail installation

Chengdu Ebyte Electronic Technology Co.,Ltd. ME31-XAAX0440_UserManul_EN
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd. 10
3.2 Device default parameters
Category
Name
Parameter
Ethernet
parameters
Operating mode
TCP server
Local IP
192.168.3.7
Native port
502
Subnet mask
255.255.255.0
Gateway address
192.168.3.1
DHCP
closure
Native MAC
Determined by the chip (fixed)
Target IP
192.168.3.3
Destination port
502
DNS server
8.8.8.8
Active upload
closure
Serial port
parameters
Baud rate
9600bps (8 types)
Check method
None (default), Odd, Even
Data bit
8 (fixed)
Stop bit
1 (fixed)
Modbus
parameters
Modbus master and slave
Slave (fixed)
address
1 (default)
3.3 Mechanical dimension drawing

Chengdu Ebyte Electronic Technology Co.,Ltd. ME31-XAAX0440_UserManul_EN
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd. 11
3.4 Port description
Number
Port
Description
1
V-
Negative power input terminal, DC 8V~28V
2
V+
Positive power input terminal, DC 8V~28V
3
NO1
Relay 1 normally open pin, used in conjunction with the common terminal of relay 1
4
COM1
Relay 1 common terminal, used in conjunction with relay 1 normally open pin
5
NO2
Relay 2 normally open pin, used in conjunction with the common terminal of relay 2
6
COM2
Relay 2 common terminal, used in conjunction with relay 2 normally open pin
7
NO3
Relay 3 normally open pin, used in conjunction with the common terminal of relay 3
8
COM3
Relay 3 common terminal, used in conjunction with relay 3 normally open pin
9
NO4
Relay 4 normally open pin, used in conjunction with the common terminal of relay 4
10
COM4
Relay 4 common terminal, used in conjunction with relay 4 normally open pin
11
485-B
RS485 interface B is connected to the external device interface B
12
485-A
RS485 interface A is connected to the external device interface A
13
GND
Analog input ground
14
AI1
Analog input channel 1
15
AI2
Analog input channel 2
16
AI3
Analog input channel 3
17
AI4
Analog input channel 4

Chengdu Ebyte Electronic Technology Co.,Ltd. ME31-XAAX0440_UserManul_EN
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd. 12
3.5 LED indicator description
Label
Color
Description
DO1
Red
The first output indication
DO2
Red
Second output indication
DO3
Red
The third output indication
DO4
Red
Fourth output indication
TX
yellow
Serial port sending data instructions
RX
yellow
Serial port receiving data indication
LINK
green
Network connection indicator
NET
green
Network port data sending and receiving
instructions
PWR
blue
Power indicator

Chengdu Ebyte Electronic Technology Co.,Ltd. ME31-XAAX0440_UserManul_EN
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd. 13
Chapter 4 Product function introduction
4.1 DO output mode
The output mode of the relay is output in different modes according to the mode set by the user, and the default level is
output.
4.1.1 Level output
Output according to the level set by the user. The switching characteristics of the level mode are similar to the function of
a self-locking switch.
4.1.2 Pulse output
After the pulse output is turned on, each time the DO output is controlled, the DO output will be automatically turned off
after the relay is closed to set the pulse width. The pulse width setting range is 50~65535ms (default 50ms).
4.1.3 Power-on state
According to the status set by the user. After the device is powered on, the output relay is turned on according to the state
set by the user, and it is turned off by default.
4.2 AI input mode
4.2.1 Analog range
Analog input AI measures the current signal, the acquisition range is 0-20mA or 4-20mA, the accuracy is 3‰, and the
resolution is 12 bits. Adopt single-ended input, sampling frequency 10Hz, input impedance 100Ω.
Set the sampling range of all AI channels, valid values are 1 and 0 (default 0).
Configured as 0: means 0~20mA
Configured as 1: Represents 4~20mA
[Note] Description of AI range configuration:
1. The AI sampling range is shared by all channels. When the AI channel sampling range is configured as 4-20mA
sampling, if the current signal is lower than 4mA, the engineering value of the channel is converted to 0. For signals
greater than 20mA, there is no conversion limit, but it should not exceed 25mA (exceeding 25mA may cause
equipment damage).

Chengdu Ebyte Electronic Technology Co.,Ltd. ME31-XAAX0440_UserManul_EN
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd. 14
2. AI channel sampling range parameter address is 0x04B2, register type is holding register, function code 0x06, 0x10.
When writing the AI channel sampling range parameter, if the parameter value written is not within the range of 0 to
1, it will automatically take the closest value to write. For example, if the write sampling range parameter is 2, the
device will take 1 as the sampling range parameter. And Modbus does not return an error command.
4.2.2 AI raw value and engineering value of analog input
There are two ways to read the magnitude of the current signal collected by the device:
1. Read the original value of AI and calculate the input current based on the input impedance. The address of the AI
original value register is 0x0000~0x0003, the register type is input register, and the read function code is 0x04. The
value returned by this method is 2 bytes representing one channel, and the range of the value read is 0~4095. The
method of calculating the current is 0~4095 corresponding to 0~25mA. The register type is discrete input register,
and the read function code is 0x04. which is:
Current = (original value × 25)/4095 (mA)
2. Read the AI engineering value and directly convert to get the input current. The address of AI engineering value
register is 0x0064~0x0067, the register type is input register, and the read function code is 0x04. The value
returned by this method is 2 bytes representing 1 channel, and the value read is 0~25000. The method of
calculating the current is 0~25000 corresponding to 0~25mA. which is:
Current = engineering value / 1000 (mA)
4.2.3 Input filter parameters
The filter parameters of the AI channel can be set, the effective value is 1-16, and the default value is 6.
Filter parameter description:
1. All AI channels share one filter parameter. The higher the parameter value, the more stable the output value and the
slower the response.
2. AI channel filter parameter address is 0x04B0, and the register type is holding register. Function code 0x06, 0x10.
3. When writing AI filter parameters, if the written parameter value is not within the range of 1-16, it will automatically
take the closest value to write. If the write filter parameter is 0, the device will take 1 as the filter parameter, and
Modbus does not return error commands.
4.2.4 Input calibration
[Note] If there is no professional calibration equipment, it is not recommended to calibrate, otherwise it will cause the
analog quantity acquisition error to become larger. The calibration method needs to be requested from the customer
service. It is recommended to back up the current calibration value before calibration.
4.3 Modbus gateway
The device can convert non-native Modbus instructions (converting Modbus TCP to Modbus RTU) and transmit them.
Theoretically, it can process up to 128 slave addresses simultaneously (limited by serial port access devices).

Chengdu Ebyte Electronic Technology Co.,Ltd. ME31-XAAX0440_UserManul_EN
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd. 15
4.4 Active upload
The device supports the function of uploading the analog input value at a fixed time interval. Setting the value of the
corresponding register can control the interval time and whether to upload.
When it is set to 0, upload is closed, and when it is set to other positive integer value N, the upload will be performed at a
time interval of N seconds.
[Note] The device is valid only when it is configured in the client mode. If the register value is non-zero, the active
upload is enabled.
4.5 Custom module information
4.5.1 Modbus address
The device address is 1 by default, and the address can be modified. The address range is 1-247.
4.5.2 Module name
Users can configure the device name to distinguish according to their own needs, support English, number format, up to
20 bytes.
4.5.3 Network parameters
Without special instructions: the following network-related parameters default to IPv4 related parameters.
(1) MAC of the device: The user can read the specified register to obtain it, and this parameter cannot be written.
(2) IP address: device IP address, both 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, readable and writable.
(6) DHCP: Set the way the device obtains IP, static (0), dynamic (1).
(7) Target IP: When the device is working in the client mode, the device is connected to the target IP/domain name.
(8) Target port: When the device is working in the client mode, the device is connected to the target port.
(9) DNS server: when the device is in client mode, it is a server that resolves the target domain name.
(10) Module working mode: used to switch the working mode of the module.
Server: The device is equivalent to a server, waiting for the user's client to connect, 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 parameter is not 0 and the device is in client mode, the device will periodically report the
original value collected by AI according to the configured time.

Chengdu Ebyte Electronic Technology Co.,Ltd. ME31-XAAX0440_UserManul_EN
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd. 16
4.5.4 Serial port parameters
Parameters for setting serial communication:
Default parameters:
Baud rate: 9600 (03);
Data bit: 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
07
115200
(2) Check Digit:
Check Digit:
0x0000(default)
NONE
0x0001
ODD
0x0002
EVEN
4.6 LCD display and parameter configuration
The display interface includes an information display page (current input value display page, network parameter display
page) and a parameter setting page (part of the parameters).
[Note] After using the screen configuration, the device will turn on the static IP by default. Please do not enter the screen
configuration interface after turning on DHCP to avoid the device from automatically turning off DHCP.
4.6.1 Information display interface
Contains the current input value display page and the network parameter display page. Short press the left and right
buttons to switch the interface. Among them:
(1) The current input display page displays the current input values of channels 1 to 4 from top to bottom;
(2) The network parameter display page separately displays the local IP address, gateway address, local port, and local
Modbus address from top to bottom;

Chengdu Ebyte Electronic Technology Co.,Ltd. ME31-XAAX0440_UserManul_EN
Copyright ©2012–2021,Chengdu Ebyte Electronic Technology Co.,Ltd. 17
4.6.2 Device parameter display interface
The parameter setting interface from top to bottom is:
1. Local IP address (IP);
2. Subnet mask (Mask);
3. Gateway (GWIP);
4. Local port (Port);
5. Modbus address (Adress);
6. Baud rate (Baud);
7. Data bit (Data);
8. Stop bit (Stop);
9. Parity;
10. Language (Language);
11. Exit (Exit);
Among them, the data bit and the stop bit cannot be set. After the DHCP mode is turned on, the local IP address, gateway,
and subnet mask cannot be configured and are only assigned by the router;
4.6.3 Parameter configuration
On the information display page, press and hold the confirm button for 2 to 3 seconds to enter the parameter setting page;
Select the setting item, and after entering the parameter configuration page, short press the up and down keys to switch
the setting item;
Select the setting item, short press to confirm or right-click, the setting item acquisition cursor represents the selection
and enter the setting item;
Adjust parameter value: After selecting the setting item, the up and down keys can change the value or the optional value;
the left and right keys can move the cursor in the parameter item;
Confirm parameter value: After adjusting the parameter value, press the confirm key to exit the current setting item.
Save parameter settings and exit: After setting the parameters, move the cursor to the exit option and short press the
middle key to save the parameters and exit the parameter setting, or long press the middle key after determining the
parameter value in any parameter item to save the parameter and Exit the parameter setting.
Other manuals for ME31-XAAX0440
1
Table of contents
Other Ebyte I/O System manuals