ME31-AAAX4220+User+Manual EN V1.0
ME31-AAAX4220+User+Manual EN V1.0
ME31-AAAX4220+User+Manual EN V1.0
Contents
1. Product overview ........................................................................................................................................................1
1.1 Introduction ...................................................................................................................................................... 1
1.2 Features .............................................................................................................................................................1
1.3 Application typology diagram ..........................................................................................................................1
2. Quick start ...................................................................................................................................................................3
2.1 Devices required ...............................................................................................................................................3
2.2 Device connection ............................................................................................................................................ 3
2.2.1 RS485 connection ................................................................................................................................. 3
2.2.2 AI Analog input connection .................................................................................................................. 4
2.2.3 DI Switching input connection ............................................................................................................. 4
2.2.4 Relay output connection ........................................................................................................................4
2.2.5 Simple use ............................................................................................................................................. 5
2.3 Parameter configuration ................................................................................................................................... 5
2.4 Control test ....................................................................................................................................................... 6
2.4.1 Modbus TCP Control ............................................................................................................................ 6
2.4.2 Modbus RTU Control ............................................................................................................................7
3 Technical indicator ...................................................................................................................................................... 8
3.1Specification and parameter .............................................................................................................................. 8
3.2 Device default parameter ................................................................................................................................. 9
3.3 Dimensions ..................................................................................................................................................... 10
3.4 Ports and indicators ........................................................................................................................................ 11
4 Product function introduction ....................................................................................................................................13
4.1DI input ............................................................................................................................................................13
4.1.1Switch input DI acquisition ..................................................................................................................13
4.1.2 Input filtering .......................................................................................................................................13
4.2 AI input ...........................................................................................................................................................13
4.2.1 Analog range ........................................................................................................................................13
4.2.3Analog input engineering quantity shaping value, engineering quantity floating point value ........... 14
4.2.4 AI Filter parameters .............................................................................................................................14
4.3 DO output ....................................................................................................................................................... 15
4.3.1 Input Count ..........................................................................................................................................15
4.3.2 Level Output ........................................................................................................................................15
4.3.3 Pulse output ......................................................................................................................................... 15
4.3.4 Follow mode ........................................................................................................................................15
4.3.5 Reverse follow mode ...........................................................................................................................16
4.3.6 Trigger flip mode .................................................................................................................................16
4.3.7 Power-on state ..................................................................................................................................... 16
4.4 Modbus gateway .............................................................................................................................................16
4.4.1 Modbus TCP/RTU Protocol Conversion ............................................................................................ 16
4.4.2 Modbus address filtering .....................................................................................................................16
4.4.3 Modbus TCP protocol data frame description .................................................................................... 17
4.4.4 Modbus RTU protocol data frame description ................................................................................... 17
4.5 IO Linkage function ....................................................................................................................................... 17
1. Product overview
1.1 Introduction
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;
2 channel analog inputs(0-20mA/4-20mA);
4-channel switch input DI (dry node) ;
2 channel switch output DO(A-type relay);
Switch output (DO) supports level mode, pulse mode, follow mode, reverse follow mode, and trigger flip
mode;
Support custom Modbus address settings;
Support 8 common baud rate configurations ;
DHCP and static IP;
DNS function, domain name analysis;
Support input output linkage.
2. Quick start
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, 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.
Wiring: The computer is connected to the RS485 interface of ME31-AAAX4220 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-AAAX4220.
2.3Parameter 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;
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.
3 Technical indicator
3.3 Dimensions
16 AI2 Analog input channel 2, supporting 0 to 20mA current input, 5.08mm Phoenix
terminal.
17 GND Channel 2 analog input ground, DC 8V~28V, 5.08mm Phoenix terminal.
18 NO1 Relay 1 normally open pin, used in conjunction with relay 1 common terminal,
5.08mm Phoenix terminal.
19 COM1 Relay 1 common terminal, used in conjunction with relay 1 normally open pin,
5.08mm Phoenix terminal.
20 NO2 Relay 2 normally open pin, used in conjunction with relay 2 common terminal,
5.08mm Phoenix terminal.
21 COM2 Relay 2 common terminal, used in conjunction with relay 2 normally open pin,
5.08mm Phoenix terminal.
22 Ethernet Ethernet interface, standard RJ45 interface.
23 DI4 Switching input channel 4, supporting dry contact connection, 5.08mm Phoenix
terminal.
24 DI3 Switching input channel 3, supporting dry contact connection, 5.08mm Phoenix
terminal.
25 DI2 Switching input channel 2, supporting dry contact connection, 5.08mm Phoenix
terminal.
26 DI1 Switching input channel 1, supporting dry contact connection, 5.08mm Phoenix
terminal.
27 GND Channel 1-4 switch input ground, 5.08mm Phoenix terminal.
28 485-A The serial port A is connected to the external device A interface, with a 5.08mm
Phoenix terminal.
29 485-B The serial port B is connected to the external device B interface, with a 5.08mm
Phoenix terminal.
4.1DI input
Switch input DI measurement level signal or edge pulse signal (rising edge, falling edge). Support dry node
collection, support DI counting function, the maximum count is 65535 (the count is automatically cleared if it
exceeds 65535).
The switch input DI branch has three trigger modes: rising edge, falling edge and level (default rising edge
trigger).
The clearing method supports automatic clearing and manual clearing (default automatic clearing).
When the switch input DI collects the signal, it needs to keep several sampling cycles before confirming. Filter
parameters can be set in the range of 1 to 16 (default 6 sampling periods, 6*1kHz).
It can be configured with the host computer through instructions.
4.2 AI input
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.
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.
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.3 DO output
The output mode of the relay outputs different modes based on the user set mode, with the default level output
turned on.
Supports counting of DI inputs, and users can configure it for rising edge acquisition, falling edge acquisition,
and level acquisition according to their own needs. You can also change the reset method according to your needs.
Trigger method:
Rising edge: Collect the rising edge (without counting on conduction, counting on shutdown) and count once.
Falling edge: Collect the falling edge (counted when conducting, not when releasing) and count once.
Level: Collect two edges and count them separately.
Zeroing method:
Automatic: The device will automatically reset every time the DI count value register (0x09DF~0x09E6) is
read.
Manual: The manual mode requires a write 1 operation on the reset signal registers (0x0AA7~0x0AAE), with
each holding register controlling one reset signal.
According to the level set by the user, the switch characteristic of the level mode is similar to the function of a
self-locking switch.
After the switch output DO is turned on, the switch output DO is automatically turned off after maintaining the
set pulse width time (in ms). The pulse width setting range is 50~65535ms (50ms by default).
According to the following source configured by the user (when the device has AI acquisition or DI detection
function, DI or AI can be used as the following source, otherwise this function is useless) to change the relay state,
multiple outputs can follow the same follow source output, simply DI When the input is detected, the relay is
automatically output as the following source (for example: DI is 1, DO is closed). When the follow mode is turned
on, the follow source should be configured at the same time, otherwise it will follow the first input by default.
According to the following source configured by the user (when the device has AI acquisition or DI detection
function, DI or AI can be used as the following source, otherwise this function is useless) to change the relay state,
multiple outputs can follow the same follow source output, simply DI When the input is detected, the relay is
automatically output as the following source (for example: DI is 1, DO is disconnected). When the follow mode is
turned on, the follow source should be configured at the same time, otherwise it will follow the first input by
default.
According to the following source configured by the user (when the device is equipped with AI acquisition or
DI detection function, DI or AI can be used as the following source, otherwise this function is useless) to change
the relay state, multiple outputs can follow the same follow source output, simply speaking, when When DI
generates a trigger signal (rising edge or falling edge), DO will have a state change. When the trigger flip mode is
turned on, the following source should be configured at the same time, otherwise it will follow the first input by
default.
According to the state 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.
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.
After being turned on, the Modbus TCP data on the network side will be converted into Modbus RTU data.
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.
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.
01 00 00 00 00 06 01 02 00 00 00 04
Transaction ID Protocol ID Length Device Address Function Code Data Segment
The linkage function is divided into AI-DO linkage and DI-DO linkage
Generally speaking, the linkage function needs to be divided into two parts.
The first part is the trigger source: both AI/DI input, the second part is the trigger: both DO/AO output
1. When DI is used as the trigger source, DI input status and DI changes can be used as signals, according to the
corresponding configuration of DO
a. In the following/reverse following mode, the current state of DI will be used as a signal, and the state of DO is
the same/opposite to that of DI
b. Trigger inversion mode, DI state change is used as a signal, if the trigger signal is set to DI rising edge change,
the current state of DO will change once
2. When AI is used as the trigger source, the AI signal is processed into a signal similar to DI through a process
similar to Schmitt trigger (refer to Chapter 4.2.2), and then this signal is linked with DO. The linkage process can
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 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.
The default address of the device is 1, and the address can be modified. The address range is 1-247.
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.
(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.
The display interface includes information display page ( AI input and DI input status, DO output status)
and parameter setting page (part of parameters).
Including the current input value display page, shortly press the left and right buttons to switch the interface
Press the left or right button to enter the password input interface, complete the correct password input, and
display the device parameter information interface (password interface: default password: 0000; short press the
middle verification password, left and right buttons to switch password bits, up and down buttons to switch current
bit values, a total of 4 digits of the password, with each input range of 0-9 digits):
The parameter setting interface from top to bottom is
1. :Modbus address;
2. Baud rate;
3. Data bits;
4. Check digit;
5. Stop bit;
6. Local port
7. Local IP address
8. Network mode
9. Gateway
10. Subnet mask
11. DNS
12. MAC address
13. DHCP
14. Target IP
15. Target port
16. Modbus TCP/RTU protocol conversion
17. Active upload
18. Modbus address filtering
Long press the confirm button to enter the password input interface, complete the correct password input, and
enter the configuration interface (password interface: default password: 0000; short press the middle to verify the
password, left and right buttons to switch password bits, up and down buttons to switch current bit values, a total of
4 digits of password, with each digit entering a range of 0-9 numbers).
Select the setting option, enter the parameter configuration page, and briefly press the up and down keys to
switch between the setting options;
Select the setting item, short press to confirm or right-click, and the cursor for the setting item represents the
selected item and enters the setting item;
Adjust parameter values: After selecting the setting option, the up and down keys can change the numerical
value or optional values; Press the left and right buttons to move the cursor within the parameter item;
Confirm parameter values: After adjusting the parameter values, press the confirm button to exit the current
setting.
Save parameter settings and restart: After setting the parameters, move the cursor to save and restart, then
short press the confirm button to enter the confirm save and restart state. Short press the confirm button (press other
buttons to exit the confirmation state) to save the parameters and restart the device.
Exit without saving parameters: move the cursor to Exit, and then press the OK key briefly to enter the
confirmed Exit status. Press the OK key briefly (press other keys to exit the confirmed status) to exit the parameter
configuration interface without saving parameters.
Among them, the data bits and stop bits cannot be set. After enabling DHCP mode, the local IP address,
gateway, and subnet mask cannot be configured and only assigned by the router;
The device screen has a sleep function, which is turned off by default and can be set to turn on in the configuration
interface.
In any interface, after 180 seconds of no button operation, the screen will enter sleep mode, and the interface will
display Xiaoyi Robot. Press any button to exit sleep mode.
When the screen is dormant, the efficiency of device program operation will be improved.
Holding R:0x03
DI count way 0x0B0C 4 RW Set DI count way
register W:0x06、0x10
Holding R:0x03
Local port 0x089D 1 RW 1~65535,default:502
register W:0x06、0x10
Holding R:0x03
Subnet mask 0x089E 2 RW Default:255.255.255.0
register W:0x06、0x10
Holding R:0x03
Gateway address 0x08A0 2 RW Default:192.168.3.1
register W:0x06、0x10
0x0000 static IP
DHCP mode Holding (default) R:0x03
0x08A2 1 RW
configuration register 0x0001 automatically W:0x06、0x10
get IP
Store in strings
Target IP/Domain Holding R:0x03
0x08A3 64 RW IP/Domain Name
Name register W:0x06、0x10
Default IP:192.168.3.3
Holding R:0x03
Server port 0x08E3 1 RW 0-65535,Default 502
register W:0x06、0x10
DNS server IP Holding R:0x03
0x08E4 2 RW Default 8.8.8.8
address register W:0x06、0x10
Module operating Holding 0x0000 server mode R:0x03
0x08E6 1 RW
mode register 0x0001 client mode W:0x06、0x10
0x0000 prohibited ,
Holding R:0x03
Active upload 0x08E7 1 RW Other:
register W:0x06、0x10
Send in 1~65535s
MOSBUS
Holding R:0x03
TCP/RTU 0x08E8 1 RW 0,turn off,1turn on
register W:0x06、0x10
conversion
0: Transparent
transmission, 1-255:
When non local data is
present, check the slave
MODBUS addrss Holding R:0x03
0x08E9 1 RW address of the
filtering register W:0x06、0x10
instruction instruction.
When it is set to a
value, it can be passed
through the
Use the read coil status (01) function code to read the output coil status, for example:
01 01 00 00 00 04 3D C9
Register first
Modbus address Function code Output coil quantity CRC check code
address
After the above command is sent to the device through the 485 bus, the device will return the following values:
01 01 01 01 90 48
Number of bytes of
Modbus address Function code Status data returned CRC check code
data
The above returned status data 01 indicates that the output DO1 is turned on.
Support operation of single coil (05), operation of multiple coils (0F) function code operation. Use the 05 command
to write a single command, for example:
01 05 00 00 FF 00 8C 3A
On:FF 00
Modbus address Function code Register first address CRC check code
Off:00 00
After sending the above command to the device through the 485 bus, the device will return the following values:
01 05 00 00 FF 00 8C 3A
Modbus address Function code Register first address Operation method CRC check code
Use the 0F function code as the command to write multiple coils, for example:
01 0F 00 00 00 04 01 0F 7E 92
Modbus Function Starting Number of Data of control CRC check
Coil number
address code address bytes of data coil code
After the above command is sent to the device through the 485 bus, the device will return the following values
01 0F 00 00 OO O4 54 08
Modbus address Function code Register address Coil number CRC check code
Use the 03 function code to read one or more register values, for example:
01 03 05 78 00 01 04 DF
Register first
Modbus address Function code Quantity of register read CRC check code
address
After the above command is sent to the device through the 485 bus, the device will return the following values:
01 03 02 00 00 B8 44
Number of bytes of
Modbus address Function code Data returned CRC check code
data
Support operation of single register (06), operation of multiple registers (10) function code operation.
Use the 06 function code to write a single Holding register, for example: set the working mode of DO1 to pulse
mode
01 06 05 78 00 01 C8 DF
Modbus address Function code Register address Write value CRC check code
After the above command is sent to the device through the 485 bus, the device will return the following values:
01 06 05 78 00 01 C8 DF
Modbus address Function code Register address Write value CRC check code
If the modification is successful, the 0x0578 register data is 0x0001, and the pulse output mode is turned on.
Use the 10 function code to write multiple holding register commands, for example: set the working mode of DO1
and DO2 at the same time.
01 10 05 78 00 02 04 00 01 00 01 5A 7D
Modbus Function Register first Register Quantity of bytes of CRC check
Written data
address code address number written data code
After the above command is sent to the device through the 485 bus, the device will return the following values:
01 10 05 78 00 02 C1 1D
Modbus address Function code Register address Register quantity CRC check code
If the modification is successful, the values of the two consecutive registers with 0x0578 as the starting address are
0x0001 and 0x0001 respectively to identify DO1 and DO2 to enable pulse output.
5 Host computer
(1) The device can be configured by selecting interfaces (serial/network); If you choose a network port, you need to
first select the network card before searching for devices.
(2) If you select a serial port, you need to select the corresponding serial port number and the same Baud, data bit,
stop bit, check bit and address segment search range as the device, and then search.
Step 3: Click on the device online to enter IO monitoring. The following is the IO monitoring screen display
Step 3: After configuring the parameters, click to download them. In the log output, you will see a prompt stating
that the parameters have been successfully saved. Click to restart the device. After the device restarts, the modified
parameters will take effect.
Revision history
About us