ME31-AAAX4220+User+Manual EN V1.0

Download as pdf or txt
Download as pdf or txt
You are on page 1of 33

ME31-AAAX4220

I/O Networking Module


Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

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

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


I
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

4.6 Active upload ..................................................................................................................................................18


4.7 Custom Module Information ..........................................................................................................................18
4.7.1 Modbus address ...................................................................................................................................18
4.7.2 Module name .......................................................................................................................................18
4.7.3 Network parameter ..............................................................................................................................18
4.7.4 UART parameter ................................................................................................................................. 19
4.8 OLED display and parameter configuration .................................................................................................. 19
4.8.1 Information display interface .............................................................................................................. 20
4.8.2 Device parameter display interface .....................................................................................................20
4.8.3 Device parameter configuration interface ...........................................................................................20
4.8.4 Screen sleep .........................................................................................................................................21
4.9 MODBUS parameter setting .......................................................................................................................... 21
4.9.1 DI register list ......................................................................................................................................21
4.9.2 AI register list ...................................................................................................................................... 22
4.9.3 DO register list .................................................................................................................................... 22
4.9.4 Module related register ....................................................................................................................... 23
4.9.5 Network related register ...................................................................................................................23
4.9.6 Modbus command operation ...............................................................................................................24
5 Host computer ........................................................................................................................................................... 27
5.1 Acquisition and control .................................................................................................................................. 27
5.2 Parameter Configuration Interface .................................................................................................................28
Revision history ............................................................................................................................................................30

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


II
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

1. Product overview

1.1 Introduction

ME31-AAAX4220 is equipped with 2 channel A-type relay outputs


and 2 channel analog inputs (0-20mA/4-20mA), and 4 channel dry contact
input detection,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;
 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.

1.3 Application typology diagram

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


1
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

Network port application topology

Serial port application topology

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


2
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

2. Quick start

Note: The test need to carry out with factory parameter.

2.1 Devices required

ME31-AAAX4220 12V SMPS USB to RS485

Computer RJ45 Cable More cables

2.2 Device connection

2.2.1 RS485 connection

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


3
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

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.

2.2.2 AI Analog input connection

2.2.3 DI Switching input connection

2.2.4 Relay output connection

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


4
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

2.2.5 Simple use

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.

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


5
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

2.4 Control test

2.4.1 Modbus TCP Control

Use network assistant to control ME31-AAAX4220, first channel DO output.

To test other function according to below table

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


6
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

Function (function code) Command


Close the first route circle 01 00 00 00 00 06 01 05 00 00 FF
(0x05) 00
02 00 00 00 00 08 01 0F 00 00 00
Full open command (0x0F)
02 01 03
02 00 00 00 00 08 01 0F 00 00 00
Full close command (0x0F)
02 01 00
Read all DI status (0x02) 01 00 00 00 00 06 01 02 00 00 00 04
Read all DO states (0x01) 01 00 00 00 00 06 01 01 00 00 00 02
Close the first route circle 01 00 00 00 00 06 01 05 00 00 FF
(0x05) 00

2.4.2 Modbus RTU Control

Use network assistant to control ME31-AAAX4220, first channel DO output.

To test other function according to below table

Function (function code) Command


Close the first route circle 01 05 00 00 FF 00 8C
(0x05) 3A
01 0F 00 00 00 02 01 03
Full open command (0x0F)
9E 96
01 0F 00 00 00 02 01 00
Full close command (0x0F)
DE 97
Read all DI status (0x02) 01 02 00 00 00 04 79 C9
01 01 00 00 00 02 BD
Read all DO states (0x01)
CB

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


7
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

3 Technical indicator

3.1Specification and parameter

Category Name Parameter


Operating voltage DC8~28V
Power supply
Power indicator Blue LED indicator
Communication
RJ45、RS485
interface
Serial port Baud rate 9600bps(can be defined by user)
Communication
Standard Modbus TCP,Modbus RTU
protocol
MODBUS Device address Modify via Modbus command and computer
AI channels 2 channel
Input type 0-20mA、4-20mA
Acquisition
10 Hz
frequency
AI input
Input indicator OLED display
Acquisition
Single end input
properties
AI resolution 3‰
Number of DO
2 channel
channel
DO output type A-type relay
DO output DO output mode Level output, pulse output
Relay contact
30V/5A, 250V/5A
capacity
Output indication OLED screen display, red LED indication
Product size 121mm * 72mm * 34mm
Product weight 145 ±5 g
Working
-40 ~ +85℃、5% ~ 95%RH(no
temperature and
condensation )
Others humidity
Storage
-40 ~ +105℃、5% ~ 95%RH(no
temperature and
condensation )
humidity
Installation Din rail installation

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


8
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

3.2 Device default parameter

Category Name Parameter


TCP server ( Max 4 channel client
Working mode
access)
Local IP 192.168.3.7
Local port 502
Subnet mask 255.255.255.0
Gateway address 192.168.3.1
Ethernet parameter
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
Baud rate 9600bps(8 type)
Check method None(default)、Odd、Even
UART parameter
Data bit 8
Stop bit 1
Modbus master slave Slave
MODBUS parameter
Address 1

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


9
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

3.3 Dimensions

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


10
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

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 DI1(LED) Switch input indicator of channel 1
7 DI2(LED) Switch input indicator of channel 2
8 DI3(LED) Switch input indicator of channel 3
9 DI4(LED) Switch input indicator of channel 4
10 DO1(LED) First relay output indicator light
11 DO2(LED) Second relay output indicator light
12 GND Negative pole of power input terminal, DC 8V~28V, 5.08mm Phoenix terminal.
13 VCC Positive pole of power input terminal, DC 8V~28V, 5.08mm Phoenix terminal.
14 AI1 Analog input channel 1, supporting 0 to 20mA current input, 5.08mm Phoenix
terminal.
15 GND Channel 1 analog input ground, DC 8V~28V, 5.08mm Phoenix terminal.

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


11
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

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.

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


12
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

4 Product function introduction

4.1DI input

4.1.1Switch input DI acquisition

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).

4.1.2 Input filtering

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

4.2.1 Analog 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.

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


13
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

4.2.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).

4.2.3Analog input engineering quantity shaping value, 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.

4.2.4 AI Filter 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

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


14
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

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.

4.3.1 Input Count

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.

4.3.2 Level Output

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.

4.3.3 Pulse output

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).

4.3.4 Follow mode

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.

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


15
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

4.3.5 Reverse follow mode

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.

4.3.6 Trigger flip mode

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.

4.3.7 Power-on state

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.

4.4 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.4.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.

4.4.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.

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


16
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

4.4.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.4.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.5 IO Linkage function

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

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


17
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

refer to DI/DO linkage.

4.6 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 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.7 Custom Module Information

4.7.1 Modbus address

The default address of the device is 1, and the address can be modified. The address range is 1-247.

4.7.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.7.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.

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


18
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

(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.

4.7.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(default) NONE
0x0001 ODD
0x0002 EVEN

4.8 OLED display and parameter configuration

The display interface includes information display page ( AI input and DI input status, DO output status)
and parameter setting page (part of parameters).

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


19
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

4.8.1 Information display interface

Including the current input value display page, shortly press the left and right buttons to switch the interface

4.8.2 Device parameter display 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

4.8.3 Device parameter configuration interface

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;

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


20
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

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;

4.8.4 Screen sleep

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.

4.9 MODBUS parameter setting

4.9.1 DI register list

Register Register Related function


Register function Quantity Operation Data Range/Remarks
address type codes
Discrete
DI state 0x0000 4 R Enter the port state R:0x02
input
Digital filter parameter,
the range is 1~16, the
DI filter Holding smaller the number, the R:0x03
0x04B1 1 RW
parameters register more sensitive, the W:0x06、0x10
larger the more stable,
the default is 6
DI pulse count Holding R:0x03
0x09DF 4 RW Enter count value
value register W:0x06、0x10
Holding 0x0000 auto clear R:0x03
DI clear way 0x0A43 4 RW
register 0x0001 manual clear W:0x06、0x10
The clearing method is
DI manual clear Holding manual, and the register R:0x03
0xAA7 4 RW
signal register writes 1 to clear the W:0x06、0x10
count value

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


21
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

Holding R:0x03
DI count way 0x0B0C 4 RW Set DI count way
register W:0x06、0x10

4.9.2 AI register list

Register Register Related


Register function Quantity Operation Data Range/Remarks
address type function codes
Integer value of
input 16-bit integer type, unit
AI engineering 0x0064 2 R R:0x04
register uA
quantity
Floating point
value of AI input 32-bit floating point
0x00C8 4 R R:0x04
engineering register type, unit mA
quantity
Analog input filter
parameters, range 1-16,
AI filter holding the smaller the number, R:0x03
0x04B0 1 RW
parameters register the more sensitive, the W:0x06、0x10
larger the more stable,
default 6
holding AI channel sampling R:0x03
AI sampling range 0x04B2 2 RW
register range W:0x06、0x10
AI Trigger High holding R:0x03
0x1F40 2 RW 0x0000: 0~20mA
Value register W:0x06、0x10
AI Trigger Low holding R:0x03
0x1F72 2 RW 0x0001: 4-20mA
Value register W:0x06、0x10
holding R:0x03
AI trigger mode 0x1FA4 2 RW 0-20000(uA)
register W:0x06、0x10

4.9.3 DO register list

Register Register Related


Register function Quantity Operation Data Range/Remarks
address type function codes
Write to change the
R:0x01
current DO state, read
DO state 0x0000 Coil 2 RW W : 0x0F 、
to get the current DO
0x05
state
R:0x01
DO power-on holding The default state of the
0x0064 2 RW W : 0x0F 、
state register coil after power-on
0x05

DO work mode 0x0578 holding 2 RW 0x0000 level without R:0x03

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


22
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

register following mode W : 0x06 、


0x10
R:0x03
holding 0x0001 pulse without
DO pulse width 0x05DC 2 RW W : 0x06 、
register following mode
0x10
R:0x03
DO follow DI:0x0000 holding
2 RW 0x0002 follow mode W : 0x06 、
source AI:0x8000 register
0x10

4.9.4 Module related register

Register Register Related


Register function Quantity Operation Data Range/Remarks
address type function codes
Holding Modbus address, R:0x03
Module address 0x07E8 1 RW
register 1~247 configurable W:0x06
Holding
Module model 0x07D0 12 R Get current model R:0x03
register
Holding
Firmware version 0x07DC 1 R Get firmware version R:0x03
register
Holding R:0x03
Module name 0x07DE 10 RW Define module name
register W:0x10
Holding
Module reset 0x07EA 1 W Enter any value to reset W:0x06
register
Restore factory Holding Enter any value to
0x07E9 1 W W:0x06
parameter register restore
See the baud rate code
Holding R:0x03
Serial baud rate 0x0834 1 RW table,
register W:0x06、0x10
Default 9600(0x0003)
0x0000 none(default)
Holding R:0x03
Serial check digit 0x0836 1 RW 0x0001 odd
register W:0x06、0x10
0x0002 even

4.9.5 Network related register

Register Register Related


Register function Quantity Operation Data Range/Remarks
address type function codes
Module MAC Holding
0x0898 3 R Device MAC parameter R:0x03
address register
Holding R:0x03
Local IP address 0x089B 2 RW Default:192.168.3.7
register W:0x06、0x10

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


23
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

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

4.9.6 Modbus command operation

1. Read coil (DO) status

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

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


24
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

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.

2. Control coil (DO) status

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

DO1 coil conduction

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

All coils are conducted.

3. Read Holding register

Use the 03 function code to read one or more register values, for example:

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


25
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

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

The above 00 00 indicates that DO1 is in level output mode.

4. Operate Holding register

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.

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


26
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

5 Host computer

5.1 Acquisition and control

Step 1: Connect the computer to the device

(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 2: Select the right device

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


27
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

Step 3: Click on the device online to enter IO monitoring. The following is the IO monitoring screen display

5.2 Parameter Configuration Interface

Step 1: Connect the device according to "Collection and Control"


Step 2: You can configure device parameters, network parameters, DI parameters, AI parameters, DO parameters,
and AO parameters (for example, if the device does not have AO function, AO parameters cannot be configured)

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


28
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

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.

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


29
Chengdu Ebyte Electronic Technology Co.,Ltd ME31-AAAX4220_UserManual

Revision history

Version Date Remarks Issued by


1.0 2023-06-06 First version LT

About us

Technical support: [email protected]


Documents and RF Setting download link: http://www.cdebyte.com
Thank you for using Ebyte products! Please contact us with any questions or suggestions: [email protected]
-------------------------------------------------------------------------------------------------
Phone: +86 028-61399028
Web: http://www.cdebyte.com
Address: B5 Mould Park, 199# Xiqu Ave, High-tech District, Sichuan, China

Copyright ©2012–2023,Chengdu Ebyte Electronic Technology Co.,Ltd


30

You might also like