Share this

Configuration process of MG_MTS_MR and Schneider M241

2026-04-06 05:30:40 · · #1

1 System Overview
The MG protocol converter is a product designed to reduce the workload of engineers by addressing the complexity of serial communication applications in the field. Engineers can quickly complete related debugging without having to deeply understand the communication protocol or write programs, thereby improving project debugging efficiency and ensuring rapid delivery.

2. Experimental Materials

3. Topology Diagram and Configuration Scheme

3.1 Configuration Steps
1. Install the MG-MTS-MR protocol converter
2. Connect MT241 and MG-MTS-MR
3. Connect the control power supply and use the gateway configuration tool to configure the protocol converter.
4. Read and write protocol converter data via instruction blocks in Machine Expert V2.0
5. Download the configuration to the controller and test whether the data read/write function is normal.
3.1.1 New Project
Open Machine Expert V2.0, create a new project, click Empty Project, set the project name, and click OK, as shown in the image below.

3.1.2 Adding a CPU
Click Untied1, click on the device tree, and then navigate to Logic Controller → M241 → TM241CEC24T/U
After selecting CPU in the directory, click Add Device and close the corresponding box.

3.1.3 Setting the CPU IP Address
Double-click Ethernet_1 (Ethernet Network) in the device tree, and set the IP address, subnet mask, and gateway address in the parameters configured on the right, as shown in the figure below.

3.1.4 Programming Procedure

Add an address translation function block.

ADDM_0 definition:
ADD_0 is the address translated by the Modbus TCP server;
Execute_ADDM is the trigger bit; this variable requires a rising edge trigger.
In '3{192.168.1.16}', 3 represents the port number, and 192.168.1.16 represents the Modbus TCP server IP address.

Add a read-retention register function block.

ADDM_0.Done: This is the activation completion signal for the ADDM function block, used to trigger the READ_VAR function block;
WRITE_VAR_0.Done and WRITE_VAR_0.Error: These represent the completion and error of the WRITE_VAR function block.
The signal is used to trigger this function block and form a polling pattern with other function blocks.
Addr: The IP address after conversion by the ADDM function block;
objType: This is the function code; 0 indicates a retention register.
FirstObj: Represents the address of the first digital input to be read;
Quantity: Indicates the number of digital inputs to be read;
Buffer: Represents the client's cache address, and the number of these is a Word array;
Add a write-retention register function block.

READ_VAR_0.Done and READ_VAR_0.Error: These are the completion and error messages for the READ_VAR function block.
The number is used to trigger this function block and form a round-robin with other function blocks;
Addr: The IP address after conversion by the ADDM function block;
objType: This is the function code; 0 indicates a retention register.
FirstObj: Represents the address of the first digital input to be read;
Quantity: Indicates the number of digital inputs to be read;
Buffer: Represents the client's cache address, and the number of these is a Word array;

4. Functional Testing

4.1 Searching for CPUs
Switch to the device tree, double-click CPU, click Update, and you can find the connected CPUs as shown in the image below.

4.2 Login CPU
Click "Online" in the menu bar, and then click "Log in" in the drop-down menu.

4.3 Establish a monitoring table

4.4 Start and monitor the program

Set Execute_ADDM to 1, start Modbus TCP to read and write to the master station through the program block, and observe whether READ_VAR_0.Done and WRITE_VAR_0.Done are 1 in a loop. If they are 1 in a loop, it means that the polling is successful.
Write the numbers 1, 2, 3, 4, 5 sequentially into the data transmission area array of the write function block for the write retention register.
6, 7, 8, 9, 10, can be read from the data receive area array of the read-retention register write function block.
The corresponding value indicates that the module test is normal.


Read next

CATDOLL 146CM Miho TPE (Customer Photos)

Height: 146cm A-cup Weight: 26kg Shoulder Width: 32cm Bust/Waist/Hip: 64/54/74cm Oral Depth: 3-5cm Vaginal Depth: 3-15c...

Articles 2026-02-22