
Function Description:
A network to 485 gateway device with Modbus edge gateway function, which can poll and temporarily store the register values of many devices
. At the same time, it can use the register value generation and/or logic judgment function to output custom
data to control local devices.
Selection suggestion:
is widely applicable to users who use Modbus devices in homes, office buildings, hotels, banks, hospitals, schools, airports, museums, factories,
laboratories, etc. It is also suitable for professionals such as weak current integrators and smart home solution engineers
.
Product features:
1. It has all the functions of traditional network TCP/IP to 485 conversion.
2, 2 independent serial ports (baud rate can be modified), each independent serial port supports 2 network ports.
3. Each network port can be configured with a server client, heartbeat, and registration package.
4, Four network ports support up to 128 client connections.
5. Network module modifier searches for configuration IP and webpage configuration parameters.
6. Supports polling and storing the status of multiple Modbus devices, allowing the server to query and retrieve them all at once.
7. Polling registers support up to 400.
8. Supports multiple conditions and logic, or logical edge judgment, directly executed locally.
9. Edge judgment execution, multiple execution instructions or scene instructions can be added.
10. The execution instruction supports custom data and can drive any bus device.
11. Edge computing judgment logic supports up to 256 groups.
12. Support secondary call development and provide API call interfaces.
13. It has NTP clock timing function, and can send
School time agreement.
14. The module is compact and supports 35 rail installation, with a wide voltage range of 7-24V power supply.
15. Support sending custom bus data to any serial port through HTTP protocol.
16. The main port supports Modbus TCP 502 port communication to obtain data.
17. Support one-time read from 1-15 registers.
Usage:
1. The module is powered on and connected to the network.
2. Using a network module modifier to search for an IP address within the same local area network, the initial state of the module is to automatically obtain the IP address,
This software is only used to search, modify, obtain IP addresses, and restart devices.

3. Use IP: 88 to access the webpage for module configuration and settings, such as 10.168.1.233:88, default
The username and password are admin, admin


4. The status page displays the status information of the module.

5. IP address, used to configure the IP related parameters of the module.

6. Port 1 is used for configuring the main serial port and two corresponding network ports.
Port 2 user polling serial port and corresponding 2 network port configurations.
S/PORT1, corresponding to the port number of network port 1;
S/PORT2, corresponding to the port number of network port 2;
RATE is the baud rate; RE CNT, 10 seconds of disconnection and reconnection time;
C1 TYPE port type, server or client; If the client C1 IP is selected, it is the IP address for connecting to the server; If the client C1 PORT is selected, it is the port for connecting to the server; If the client C1 REG is selected, it is the registration package for connecting to the server, in hexadecimal format; If client C1 HBC is selected, it is the heartbeat packet for connecting to the server, in hexadecimal format; If client C1 HBCT is selected, the time interval between heartbeat packets connected to the server is in seconds; The configuration of S/PORT2 is the same as port 1.
If client C1 IP is selected, it is the IP address for connecting to the server;
If the client C1 PORT is selected, it is the port for connecting to the server;
If client C1 REG is selected, it is the registration package for connecting to the server, in hexadecimal format;
If client C1 HBC is selected, it is the heartbeat packet for connecting to the server, in hexadecimal format;
If client C1 HBCT is selected, the interval between heartbeat packets connected to the server is in seconds;
The configuration of S/PORT2 is the same as port 1.


7. Modbus, mainly used for configuring polling data.
• ADD is the external Modbus address, and you can poll all the
register data you have configured through the network and main serial port.
• STA is in status, should polling be enabled.
• QT is the polling time interval between two registers.
• HREG is the Host Register, which can query the value of the configured register through the network and main serial port at once
.
• FUN is the polling function code and the number of polling registers. "23" represents querying two registers at once with function code 03
.
• NAME is the name of the register for auxiliary memory.
• SAD is Sliver Add, the slave address.
• SREG is the Sliver Register, a slave register.
• VALUE is the value of the polling return register.



8, Automation/Automation is mainly used for comparing and calculating the data returned by the loop with or logic, and calling instructions for execution.
And call the instruction to execute.
• Automation Name: is the name of this logic.
• Logical operator: You can choose between AND logic (execute only when both are satisfied) and OR logic (execute when one is satisfied).
• Result True Execution: Indicates that the custom hexadecimal data 1111 (with no spaces between
data) is issued after the operation conditions are met. If multiple instructions need to be sent, click Add Execution. The
register involved in logical operations will make a logical judgment whenever one of them changes.
• False execution result: indicates that the custom hexadecimal data 1111 (with no spaces between data
) is issued after the operation conditions are not met. If multiple instructions need to be sent, click "Add Execution". The registers involved in the logical operation
will make a logical judgment whenever one of them changes.
• Condition 1-HADD: Represents the Modbus host address (address of MG02) involved in logical judgment;
Condition 1-HREG Add: represents the Modbus host register address involved in logical judgment; So it is
can obtain unique comparison values to participate in automated logical operations
Conditional operator: represents the logical judgment operation rules for register values, including greater than, less than, etc.
is greater than or equal to, less than or equal to, and not equal to; The condition value represents the reference value for participating in the operation rule.
• Add Condition Button: Multiple judgment conditions can be added, combined with logical operators for AND/OR
judgment.


9. Set the username and password in the settings menu.
• Whether to enable the timing function, it is possible to send the timing protocol to serial port 1 or serial port 2 through the protocol. The timing cycle of
is 24 hours, and clicking on 'Calibrate Now' will immediately send the timing protocol. The machine code is the first 4 bytes of the timing protocol
.
• Timing Protocol:
Example: Saturday, July 2, 2023 11:27:09
22 10 11 00 (machine code) F0 BB 78 01 (fixed byte) 0B (11:00) 1B (27th)
09 (09 seconds) 17 (23 years) 07 (July) 02 (2nd) 06 (Saturday) 64 (End byte)
Note: Sunday is 07, not 00
• Issue port, you can choose the serial port sent by the timing protocol, PORT1 is serial port 1, PORT2 is serial port 2.
• WEB PORT is the web access port, which defaults to 88 and cannot be modified temporarily.
• Module name, for easy management of module names.

Update Function
1. Some devices' register data, especially for electric meter products, is 4 bytes long, so our
original storage location of 2 bytes cannot meet it. This optimization supports register data reading with lengths of 2, 4, 5, and 8
bytes. After data reading, it will be automatically recorded in the next data storage location
. For example, if your data is 4 bytes and the register address
you read is 00 48, then the data will be automatically filled into the host registers 00 11 and 00 12 positions. Send
to memory 00 12 and fill in FF 01. This way, the system will automatically skip the 00 12 polling and only poll 00 11
. If the first byte of the register address is FF XX, the system will skip polling at that position.
If the first byte of the register address is FF XX, the system will skip polling at that position.

2. Optimization of automated logic judgment. In the early stage, our automated judgment logic was based on the value sources of the device
's address and register address. In theory, there should be no repetition, but many Modbus protocols have the same
memory address and different function codes that read different meanings. For example, the 01/02 power
can read the 00 00 register: 01 reads the output status, and 02 reads the input status. When participating in automated logic state comparison, it is not possible to obtain a unique value for comparison. By changing the comparison address to the host address and the register address to the host register address, we can obtain a unique comparison value to participate in automated logic operations.
When participating in automated logic state comparison, unique values cannot be obtained for comparison. place
We will change the comparison address to the host address and the register address to the host register address,
This way, a unique comparison value can be obtained to participate in automated logic operations.

3. Multiple register read rules have been configured. If you want to copy to multiple devices, it is time-consuming to add
all at once, so we have developed a tool that can backup and restore the Modbus register read rules of
settings. Fill in the gateway address of MG02 to backup and restore.


HTTP protocol
supports sending custom serial port data to the bus network through the HTTP protocol.
The HTTP protocol format is as follows:
http://192.168.1.200:88/uartw.cgi?data=DDCCBBAACC00020001&type
=1&pswd123asadmin:admin=
http://192.168.1.200:88/uartw.cgi?data=DDCCBBAACC00020001 (16 input
data)&type=1 (1/2 represents serial port 1/2)&pswd123 (fixed) as (fixed)
admin (username): admin (password)=
Modbus TCP protocol
supports Modbus TCP communication mode, and the usage method is as follows:
In client or server mode, set the port of the main port to 502, and the communication mode between the upper computer and MG02
will automatically switch to Modbus TCP mode. At the same time, the other communication port will
will become invalid.
Leave a Reply