Ebyte ME31-XAXA0404 User manual

ME31-XAXA0404
I/O networking module

Chengdu Ebyte Electronic Technology Co., Ltd. ME31- XAXA0404 _User Manual
Copyright © 2012–2023 , Chengdu Ebyte Electronic Technology Co., Ltd.
I
Contents
Chapter 1 Product Overview .......................................................................................................................................... 1
1.1 Product introduction .........................................................................................................................................1
1.2 Features .............................................................................................................................................................1
1.3 Application topology diagram ..........................................................................................................................2
Chapter 2 Quick Start ..................................................................................................................................................... 3
2.1 Devices required ...............................................................................................................................................3
2.2 Device connection ............................................................................................................................................ 4
2.2.1 RS485 connection ................................................................................................................................. 4
2.2.2AI analog input connection .................................................................................................................... 5
2.2.3 AO analog output connection ................................................................................................................5
2.2.4 Easy to use .............................................................................................................................................5
2.2.5 Parameter configuration ................................................................................................................................ 6
2.3 control test ........................................................................................................................................................ 7
2.3.1Modbus TCP control .............................................................................................................................. 7
2.3.2Modbus RTU control ..............................................................................................................................8
Chapter 3 Technical indicators ....................................................................................................................................... 9
3.1 Specifications and parameters ..........................................................................................................................9
3.2Device default parameters ...............................................................................................................................10
3.3 Dimensions ..................................................................................................................................................... 11
3.4 Ports and Indicators ........................................................................................................................................12
Chapter 4 Product function introduction ......................................................................................................................14
4.1AI input ............................................................................................................................................................14
4.1.1Analog range ........................................................................................................................................ 14
4.1.2 Trigger mode ....................................................................................................................................... 14
4.1.3 Engineering quantity integer value and engineering quantity floating point value of analog input ..15
4.1.4 AI filter parameters ..............................................................................................................................15
4.2 AO output ....................................................................................................................................................... 15
4.2.1 AO output range .................................................................................................................................. 15
4.3 Modbus gateway .............................................................................................................................................16
4.3.1 Modbus TCP/RTU protocol conversion ............................................................................................. 16
4.3.2 Mod bus address filtering ....................................................................................................................16
4.3.3 Mod bus TCP protocol data frame description ................................................................................... 16
4.3.4 Mod bus RTU protocol data frame description .................................................................................. 16
4.4 Active upload ..................................................................................................................................................17
4.5 Custom module information ...........................................................................................................................17
4.5.1 Mod bus address ..................................................................................................................................17
4.5.2 Module name .......................................................................................................................................17
4.5.3 Network parameters ............................................................................................................................ 17
4.5.4 Serial parameters ................................................................................................................................. 18
4.6 OLE D display and parameter configuration ................................................................................................. 18
4.6.1 information display interface .............................................................................................................. 19
4.6.2 Device parameter display interface .....................................................................................................19

Chengdu Ebyte Electronic Technology Co., Ltd. ME31- XAXA0404 _User Manual
Copyright © 2012–2023 , Chengdu Ebyte Electronic Technology Co., Ltd.
II
4.6.3 Device parameter configuration interface ...........................................................................................19
4.6.4 screen sleep ..........................................................................................................................................20
4.7 MODBUS parameter configuration ............................................................................................................... 20
4.7.1 A I register list ..................................................................................................................................... 20
4.7.2 A O register list ....................................................................................................................................21
4.7.3 Module Related Registers ................................................................................................................... 21
4.7.4 Network related registers .................................................................................................................... 22
4.7.5 Mod bus instruction operation example ..............................................................................................23
Chapter 5 Configuration software ................................................................................................................................ 26
5.1 Acquisition and Control ................................................................................................................................. 26
5.2 Parameter setting ............................................................................................................................................ 27
Revision history ............................................................................................................................................................30
About Us .......................................................................................................................................................................30

Chengdu Ebyte Electronic Technology Co., Ltd. ME31- XAXA0404 _User Manual
Copyright © 2012–2023 , Chengdu Ebyte Electronic Technology Co., Ltd.
1
Chapter 1 Product Overview
1.1 Product introduction
ME31-XAXA0404 is equipped with 4 analog outputs (0 -20
mA /4-20mA) and 4 analog inputs (0 -20 mA /4-20mA) , and
supports Modbus TCP protocol or Modbus RTU protocol for
acquisition control , At the same time, the device can also be used
as a simple Modbus gateway (automatically send commands with
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 control I/O;
R J45 acquisition and control I /O , support 4- way host access;
Support OLED display to display status information, and configure device parameters through buttons;
4 analog inputs (0-20 mA / 4-20mA ) ;
4 analog outputs (0 -20 mA /4-20mA ) ;
Support custom Modbus address setting;
Support multiple baud rate configuration and verification configuration;
Support DHCP and static IP ;
Support DNS function, domain name resolution;
Support Modbus gateway function;

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

Chengdu Ebyte Electronic Technology Co., Ltd. ME31- XAXA0404 _User Manual
Copyright © 2012–2023 , Chengdu Ebyte Electronic Technology Co., Ltd.
3
Chapter 2 Quick Start
[Note] This experiment needs to be carried out with the default factory parameters.
2.1 Devices required
The following table lists the materials required for this test:
M E31- XAXA0404
1 2V switching power
supply
USB to RS485
computer
a network cable
Several cables

Chengdu Ebyte Electronic Technology Co., Ltd. ME31- XAXA0404 _User Manual
Copyright © 2012–2023 , Chengdu Ebyte Electronic Technology Co., Ltd.
4
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 original signal. Therefore, it is necessary to add a terminal resistor at the end of the
transmission line so that the signal does not reflect after reaching the end of the transmission line. The terminal resistance should be the same as the impedance of
the communication cable, the typical value is 120 ohms. Its function is to match the bus impedance and improve the anti-interference and reliability of data
communication.

Chengdu Ebyte Electronic Technology Co., Ltd. ME31- XAXA0404 _User Manual
Copyright © 2012–2023 , Chengdu Ebyte Electronic Technology Co., Ltd.
5
2.2.2AI analog input connection
2.2.3 AO analog output connection
2.2.4 Easy to use
Wiring: The computer is connected to the RS485 interface of ME31 - XAXA0404 through USB to RS485 , A is connected to A, and B is connected to B.
Networking: the network cable is inserted into the R J45 port and connected to the PC .
Power supply: Use DC - 1 2V switching power supply (DC 8 ~ 28 V ) to power ME31 - XAXA0404 .

Chengdu Ebyte Electronic Technology Co., Ltd. ME31- XAXA0404 _User Manual
Copyright © 2012–2023 , Chengdu Ebyte Electronic Technology Co., Ltd.
6
2.2.5 Parameter configuration
Step 1: Modify the IP address of the computer to be consistent with the device. Here I am modifying it to 1
92.168.3.100 to ensure that it is on the same network segment as the device and that the IP is different. If you
cannot connect to the device after the above steps, please turn off the firewall and try again;
Step 2 : Open the network assistant, select the TCP client , enter the remote host IP 1 92.168.3.7 ( default
parameter), enter the port number 5 02 (default parameter), and select HEX to send.

Chengdu Ebyte Electronic Technology Co., Ltd. ME31- XAXA0404 _User Manual
Copyright © 2012–2023 , Chengdu Ebyte Electronic Technology Co., Ltd.
7
2.3 control test
2.3.1Modbus TCP control
Use the network assistant to control the first A O output 10mA of M E31- XAXA0404 .

Chengdu Ebyte Electronic Technology Co., Ltd. ME31- XAXA0404 _User Manual
Copyright © 2012–2023 , Chengdu Ebyte Electronic Technology Co., Ltd.
8
Other functions can be tested through the commands in the table below.
function (function code)
instruction
Control A O1 Output 1 0 mA (0x 10)
0 1 00 00 00 00 0B 01 10 00 00 00 02 04 41 20 00 00
Read A O1 output (0x03 )
0 1 00 00 00 00 06 01 03 00 00 00 02
Read all AI inputs ( 0x04)
0 1 00 00 00 00 06 01 04 00 64 00 04
The input registers read by the demonstration case are engineering quantities ( 16 -bit integer values, and 32 -bit
floating-point values can also be obtained by reading the 0x00C8 register )
By converting the value read by the input register into 10 base , divide by 1 000 and compare with the value
displayed on the screen.
2.3.2Modbus RTU control
the analog input status of M E31-XAXA0404 .
Other functions can be tested through the commands in the table below.
function (function code)
instruction
Read all AI inputs ( 0x04)
01 04 00 64 00 04 B0 16
Read current A O1 output (0x 03 )
01 03 00 00 00 02 C4 0B
Control A O1 current output 1 0mA (0x 10 )
01 0 00 00 00 02 04 41 20 00 00 E6 59

Chengdu Ebyte Electronic Technology Co., Ltd. ME31- XAXA0404 _User Manual
Copyright © 2012–2023 , Chengdu Ebyte Electronic Technology Co., Ltd.
9
Chapter 3 Technical indicators
3.1 Specifications and parameters
Category
Name
Parameter
power supply
Operating Voltage
D C8 ~ 2 8V
Power indicator
Blue LED indication
serial port
Communication
Interface
RJ45 , RS485
baud rate
9600 bps (customizable)
Protocol
Standard Modbus TCP , Modbus RTU protocol
MODBUS _
device address
Can be modified by Modbus command and host
computer
AI input
Number of AI
channels
4 way
Acquisition
Features
single-ended input
input type
0-20mA , 4-20mA _ _ _
AI Resolution _
3 ‰
Acquisition
frequency
1 0 Hz
input instructions
O LED screen display
A O output
Number of A O
channels
4 way
AO output type
Current output, 2-wire connection
A O output range
0~20mA _ \ 4 ~20mA _
A O resolution
1 6 bits
Output accuracy
3 ‰
output indication
O LED screen display
other
Product Size
121 mm * 72mm * 34mm ( L*W*H )
product weight
1 35 ± 5g _
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- XAXA0404 _User Manual
Copyright © 2012–2023 , Chengdu Ebyte Electronic Technology Co., Ltd.
10
3.2Device default parameters
category
name
parameter
Ethernet parameters
Operating mode
T CP server (up to 4 clients access)
Local IP
1 92.168.3.7
local port
5 02
subnet mask
2 55.255.255.0
gateway address
192.168.3.1
D HCP
closure
Native MAC
Determined by the chip (fixed)
Target IP
1 92.168.3.3
target port
5 02
DNS server _
114 . 114 . 114 . 114
active upload
closure
Serial parameters
baud rate
9 600bps (8 types)
Check method
None (default), Odd, Even
data bit
8
stop bit
1
MODBUS parameters
_
M odbus master-slave
Slave
address
1

Chengdu Ebyte Electronic Technology Co., Ltd. ME31- XAXA0404 _User Manual
Copyright © 2012–2023 , Chengdu Ebyte Electronic Technology Co., Ltd.
11
3.3 Dimensions

Chengdu Ebyte Electronic Technology Co., Ltd. ME31- XAXA0404 _User Manual
Copyright © 2012–2023 , Chengdu Ebyte Electronic Technology Co., Ltd.
12
3.4 Ports and Indicators
serial
number
Label
illustrate
1
TX (LED)
Serial port send data indicator light
2
RX (LED)
Serial port receiving data indicator light
3
LINK (LED)
network connection light
4
NET (LED)
Network data sending and receiving indicator light
5
PWR (LED)
Power input indicator
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
O1 _
Analog output current ( positive pole ) , channel 1
9
A GND
Analog output current (negative pole) , channel 1
1 0
A O2
Analog output current ( positive pole ) , channel 2
1 1
A GND
Analog output current (negative pole) , channel 2
1 2
A O 3
Analog output current ( positive pole ) , channel 3
1 3
A GND
Analog output current (negative pole) , channel 3
1 4
A O 4
Analog output current ( positive pole ) , channel 4
1 5
A GND
Analog output current (negative pole) , channel 4

Chengdu Ebyte Electronic Technology Co., Ltd. ME31- XAXA0404 _User Manual
Copyright © 2012–2023 , Chengdu Ebyte Electronic Technology Co., Ltd.
13
1 6
Ethernet
Ethernet interface, standard RJ45 interface.
1 7
AI 4
Analog input channel 4 , supports 0 to 20mA current input, 5.08mm Phoenix
terminal.
1 8
AI 3
Analog input channel 3 , supports 0 to 20mA current input, 5.08mm Phoenix
terminal.
1 9
AI 2
Analog input channel 2 , supports 0 to 20mA current input, 5.08mm Phoenix
terminal.
2 0
AI1
Analog input channel 1, supports 0 to 20mA current input, 5.08mm Phoenix
terminal.
2 1
GND
Channel 1-4 analog input ground, 5.08mm Phoenix terminal.
2 2
485-A
The A of the serial port is connected to the A interface of the external device,
and the 5.08mm Phoenix terminal.
2 3
485-B
The B of the serial port is connected to the B interface of the external device ,
and the 5.08mm Phoenix terminal.

Chengdu Ebyte Electronic Technology Co., Ltd. ME31- XAXA0404 _User Manual
Copyright © 2012–2023 , Chengdu Ebyte Electronic Technology Co., Ltd.
14
Chapter 4 Product function introduction
4.1AI input
4.1.1Analog range
The analog input AI measures the current signal, the acquisition range is 0-20mA or 4-20mA, the precision is
3 ‰, and the resolution is 12 bits. Single-ended input is adopted , the sampling frequency is 10Hz, and the
input impedance is 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: means 4~20mA
[Note] AI configuration instructions
( 1) The AI sampling range of each channel can be set . When the AI channel sampling range is configured as
4-20mA sampling, if the current signal is lower than 3.5 mA is displayed as 0, and when it is higher than 3.5 mA
and lower than 4mA, it is displayed as 4 . There is no conversion limit for signals greater than 20mA, but it cannot
exceed 25mA (there will be equipment damage risk if it exceeds 25mA).
( 2) The starting address of the AI channel sampling range parameter is 0x04B2, the register type is holding
register, and the function code is 0x06, 0x10. When writing AI channel sampling range parameters, if the written
parameter value is not within the range of 0 to 1, it will automatically take the closest value and write it in. If the
sampling range parameter is 2, the device will take 1 as the sampling range parameter. And M odbus will not return
wrong command.
4.1.2 Trigger mode
( 1) Not trigger: mode off .
(2 ) Rising trigger: When the AI input value becomes greater than the set AI trigger high value, the AI trigger
is high (that is, the output state is 1), and a rising edge trigger is generated. After the trigger, as long as the AI value
is not lower than the set When the AI trigger is low, the current output value is always 1 (can be linked with DO) .
(3 ) Falling trigger: When the AI input value becomes less than the set AI trigger low value, the AI trigger is
low (that is, the output state is 0), and a falling edge trigger is generated. After the trigger, as long as the AI value is
not higher than the set When the AI trigger is at a high value, the current output value is always 0 (can be linked
with DO) .
(4 ) Bilateral trigger: When the AI input value becomes greater than the set AI trigger high value, the AI trigger
is high (that is, the output state is 1), and a rising edge trigger is generated. After the trigger, as long as the AI value
is not lower than the set When the AI trigger is low, the current output value is always 1; when the AI input value
becomes smaller than the set AI trigger low value, the AI trigger is low (that is, the output state is 0), and a falling
edge trigger is generated. After the trigger As long as the AI value is not higher than the set AI trigger high value,
the current output value is always 0 (can be matched with DO linkage) .

Chengdu Ebyte Electronic Technology Co., Ltd. ME31- XAXA0404 _User Manual
Copyright © 2012–2023 , Chengdu Ebyte Electronic Technology Co., Ltd.
15
4.1.3 Engineering quantity integer value and engineering quantity floating
point value of analog input
There are two ways to read the current signal collected by the device:
(1 ) Read the AI engineering volume shaping value, and directly convert to get the input current. The starting
address of the register of AI engineering quantity shaping value is 0x0064, the register type is input register, and the
read function code is 0x04. The value returned by this method represents one channel per register , and the value
read is 0 to 25000. The method of calculating the current is 0~25000 corresponding to 0~25mA. That is :
Current = engineering value / 1000 (m A)
(2 ) Read the floating-point value of the AI engineering quantity , and use the IEE754 conversion tool to
convert the hexadecimal data into a floating-point number to obtain the input current. The starting address of the
register of AI engineering quantity shaping value is 0x00 C8 , the register type is input register, and the read
function code is 0x04. This method returns two registers representing 1 channel.
4.1.4 AI filter parameters
AI channel can be set , the effective value is 1-16 , and the default value is 6.
Description of filtering parameters:
(1) All AI channels share a filter parameter. The higher the parameter value, the more stable the output value and
the slower the response.
(2) The AI channel filter parameter address is 0x04B0, and the register type is a holding register. Function code
0x06, 0x10.
(3) When writing AI filter parameters, if the written parameter value is not within the range of 1 to 16, it will
automatically take the closest value and write it in. 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 AO output
4.2.1 AO output range
Analog output ( AO ), the current output type can be configured as 0~20mA or 4~20mA , the precision is 3 ‰,
and the resolution is 16 bits.
The power-on default output value can be set (when the working mode is switched, the power-on value will be
output according to the lowest value of the current range).

Chengdu Ebyte Electronic Technology Co., Ltd. ME31- XAXA0404 _User Manual
Copyright © 2012–2023 , Chengdu Ebyte Electronic Technology Co., Ltd.
16
4.3 Modbus gateway
The device can transparently transmit non-native Modbus commands from the network/serial port to the serial
port/network, and the local Modbus commands are directly executed .
4.3.1 Modbus TCP/RTU protocol conversion
After opening, Modbus TCP data on the network side will be converted to Modbus RTU data .
4.3.2 Mod bus address filtering
This function can be used as the host to access the serial port of the device in some host software or
configuration screen, and use the gateway function of the device, the slave is on the network end, and Modbus is
turned on It is used when the function of TCP to RTU is converted. There are multiple slaves on the bus that 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, the data is transparently transmitted, and the parameter is 1-255 Only
data from the set slave address is passed.
4.3.3 Mod bus TCP protocol data frame description
TCP frame format:
Transaction ID
Protocol ID
length
device address
function code
data segment
2 Bits
2 Bits
N+ 2 B it
1 Bit
1 B it
N B it
Transaction ID: 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 length of the next data in bytes.
Example: Get D I Status
0 1 00
0 0 00
0 0 06
0 1
0 2
0 0 00 00 04
Transaction ID
Protocol ID
length
device address
function code
data segment
4.3.4 Mod bus RTU protocol data frame description
RTU frame format:
device address
function code
data segment
Check codeCRC
1 bit
1 B it
N B it
2 Bits

Chengdu Ebyte Electronic Technology Co., Ltd. ME31- XAXA0404 _User Manual
Copyright © 2012–2023 , Chengdu Ebyte Electronic Technology Co., Ltd.
17
Example: Get D I Status Command
01
02
00 00 00 04
79 C9
Device Modbus address
function code
data segment
CRC check code
4.4 Active upload
The device supports the function of uploading analog input values at fixed time intervals. Setting the value of
the corresponding register can control the interval time and whether to upload.
Devices with digital input will actively upload once after successfully connecting to the server, and then the
digital input will be uploaded following the status change. Devices with analog input will report the analog input
status according to the configured active upload time period (the configuration period is 1-65535 ).
When it is set to 0, the upload is disabled; if it is set to other positive integer value N, the upload will be
performed at intervals of N seconds.
[Note] The device can only be valid if it is configured in client mode, and the register value is non-zero to enable
active upload.
4.5 Custom module information
4.5.1 Mod bus address
The device address is 1 by default, and the address can be modified, and the address range is 1-247.
4.5.2 Module name
Users can configure the device name according to their own needs to distinguish, support English, digital
format, up to 20 bytes.
4.5.3 Network parameters
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: device IP address, readable and writable.
(3) Mod bus 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.
Table of contents
Other Ebyte I/O System manuals