IMDHMIControls LibraryShop main store

Troubleshooting

Why a Do-more MRX cannot open a TCP connection

Industrial networks Published 6 min read By IMDHMI controls team

Short answer

A Do-more MRX reports it could not open a TCP connection because the controller's Ethernet port subnet mask classified the KNX converter as remote, so the handshake went to a gateway that could not deliver it. Correct the port's IP address, subnet mask and gateway to the converter's subnet and retry the same MRX; the register offset and Unit ID only matter once TCP connects.

On this page
  1. What does the MRX TCP-open diagnostic actually tell you?
  2. Why can't the register offset or Unit ID cause this error?
  3. How does a subnet mask make a local converter look remote?
  4. Which Do-more Ethernet port settings do you read and correct?
  5. What order should you test in?
  6. What if the corrected mask still fails?
  7. Questions asked

The MRX read failed because the Do-more Ethernet port's subnet mask classified the KNX converter as a remote device, so the TCP handshake was never attempted on the local wire. The repair is the port's own IP address, subnet mask and gateway, matched to the converter's subnet, followed by a retry of the unchanged MRX request. The register offset and Unit ID sit inside the Modbus message and are evaluated only after TCP connects, so they cannot produce this diagnostic. The working CLICK on the same converter is your proof that the server is alive and your reference for the converter's network settings.

What does the MRX TCP-open diagnostic actually tell you? #

The message means the instruction reached the point of opening a TCP connection to the configured server and the connection was never established; in the reported case it read exactly as shown below and named the instruction and its step. Everything after that point, the Modbus request, the register address and the Unit ID, never executed because there was no connection to carry them.

Couldn't open TCP connection with specified device in MRX @0000005B (MRX at $Main@0)

That single sentence fixes the layer you work on. Modbus TCP rides on a TCP connection, normally to port 502, opened with a three-way handshake: SYN, SYN-ACK, ACK. If the SYN never reaches the converter, or the SYN-ACK never comes back, the instruction stops before any Modbus byte exists. An addressing mistake produces a different family of symptoms, exception responses or wrong data, the kind covered by the article on MB_CLIENT error 8383 on multi-register reads, and those appear only after a connection is up.

Why can't the register offset or Unit ID cause this error? #

Both values live inside the Modbus data unit that is sent over the finished TCP connection, so the converter cannot reject or misread them until the handshake has succeeded. A wrong offset gets you an exception code or bad values; a wrong Unit ID gets you no reply or an exception; a failed TCP open gets you this message. The observation that the CLICK setup accepted the reference-style address 400001 while the MRX instruction takes a raw offset is a real difference, but it belongs to the layer you check last. The thread's reply suggesting Unit ID 255 targets the same message-level behavior, and 255 is widely ignored by servers, but no Unit ID value can open a socket.

How does a subnet mask make a local converter look remote? #

The subnet mask on the controller's Ethernet port decides whether each destination is on the local subnet or behind a router, per the host requirements in RFC 1122: the interface ANDs its own address and the destination address with the mask and compares the results. Equal means local, and the frame goes straight to the converter's Ethernet address. Different means remote, and the SYN goes to the configured gateway instead. If that gateway does not exist, is misaddressed, or has no route back, the handshake dies there and the converter never sees a packet, even though cable, switch and converter are all healthy. The same mechanism explains why a laptop NIC with no address on the device's subnet cannot even ping it.

Worked example, with illustrative addresses: the PLC port is 192.168.1.10 and the converter is 192.168.1.200 on a plan that assigns 255.255.255.0.

With the correct mask, 255.255.255.0, only the last octet matters for the comparison, and it is masked to zero for both: the PLC's network is 192.168.1.0 and the converter's network is 192.168.1.0. Equal, so the converter is local and the SYN goes directly to it.

With a wrong mask of 255.255.255.128, the last octets are 10 = 00001010 and 200 = 11001000, each ANDed with 128 = 10000000. The PLC side gives 00000000 = 0, network 192.168.1.0. The converter side gives 10000000 = 128, network 192.168.1.128. Different, so the port treats a converter on the same switch as remote and hands the SYN to the gateway. No handshake, and the MRX instruction reports that it could not open the TCP connection.

Which Do-more Ethernet port settings do you read and correct? #

Read the port's active network configuration, not the offline project copy, and compare each value with the approved network plan. The H2 Series hardware manual lists what the port's network settings consist of: Module ID, Module Name, Module Description, IP Address, Subnet Mask and Gateway. The mask is the prime suspect here, but check all three addressing values at once, because a correct mask with a wrong IP address on the port produces the same classification error from the other end.

Correct only the values that conflict with the plan, apply the configuration through the controller's supported workflow, expect to lose the engineering connection when the port's address changes, and reconnect through the corrected path. Then read the settings back from the live port. A setting that shows correctly in the project but never reached the hardware is the classic repeat of this fault.

What order should you test in? #

Run the checks in this order so each step either fixes the fault or eliminates one layer:

  • Record the exact diagnostic, the destination address in the MRX instruction, and the port's current IP address, mask and gateway before changing anything.
  • Apply the port's configured mask to its own address and to the converter's address, as in the worked example, and classify the converter as local or remote. If the classification contradicts the physical topology, correct the mask against the network plan and retry the unchanged MRX.
  • Confirm the converter's IP address, mask, gateway and Modbus TCP listening port from its own configuration, using the working CLICK connection as the reference; the setup in a CLICK Plus as a Modbus TCP client shows what a working client configuration looks like.
  • Check link lights and switch-port status, and rule out a duplicate IP address on the subnet.
  • Retry the MRX. The TCP-open diagnostic should clear on the first scan after the port's settings are live.

Only after the diagnostic clears do you move to message-level checks. If the read now returns an exception or wrong data, the address convention difference is the next suspect: under the 400001 reference convention, holding register 400001 is offset 0, so 400001 minus the 400001 base gives the offset the MRX instruction wants.

What if the corrected mask still fails? #

When the addressing classifies the converter as local and the SYN still gets no answer, the remaining causes sit between the two devices or inside the converter. A switch can hold stale forwarding or address-resolution state after one device's IP address was changed; a controlled power cycle of that switch, scheduled around the other equipment on it, clears that state. The converter may also enforce a limit on concurrent TCP connections and accept the CLICK while rejecting the Do-more; disconnect the CLICK deliberately during the test instead of leaving it connected throughout. If the Do-more connects only after another client drops, read the converter's documented connection limit and decide which clients stay. A restart that repeatedly restores communication is a symptom of retained sessions or resource exhaustion, not a repair, so record it and pursue the converter's documented recovery procedure.

Questions asked

Does a successful ping prove the Modbus TCP connection will work?

No. Ping uses ICMP, while Modbus TCP needs a TCP handshake on the server's listening port, normally 502. A converter can answer ping and still refuse or drop the TCP connection, and some devices block ping while serving Modbus normally. The decisive test is the MRX instruction itself clearing its TCP-open diagnostic.

What does the Do-more network reset clear?

The hardware manual documents a reset function that clears only the network settings: Module ID, Module Name, Module Description, IP Address, Subnet Mask and Gateway. Write down the active values before using it, because after the reset you must re-enter the approved addressing before the engineering workstation can reconnect.

Can I copy the working CLICK settings straight to the Do-more port?

Copy the values from the approved network plan, not blindly from the CLICK. The working CLICK proves the converter serves Modbus TCP under the tested conditions, but the two PLCs may sit on different subnets or reach the converter through different paths. What you must reproduce is the correct mask and gateway for the Do-more port's own place in the topology.

How many TCP connections can the converter accept at once?

That limit is set by the converter and is not universal; only its documentation states it. The symptom to watch for is the Do-more connecting only after another client disconnects. If you see that pattern, read the converter's documented concurrent-connection limit and decide which clients must stay connected before cycling anything.

What Unit ID should the MRX instruction use?

Use the value the converter's documentation assigns. Value 255 is widely accepted and ignored by many servers, but the Unit ID travels inside the Modbus message, so no value can cause or cure a TCP-open failure. Set it per the documentation, then leave it alone while you fix the port's network settings.

Keep reading

  • Comparison

    Can a Modbus TCP server answer on multiple IP addresses

    No. A Modbus TCP server instance replies from the one IP assigned to the interface the client dialed, and a controller cannot put two interfaces in the same subnet. Serve both register ranges from one address with a flat register map, add server instances on separate TCP ports for extra simultaneous clients, or mount a second interface only in its own different subnet.

    Industrial networks

  • How-to

    Configure the ctrlX CORE XF51 port for a second Modbus TCP network

    The ctrlX PLC application can run a second Modbus TCP network through XF51 without a bridge, because CXA_ModbusTCP has no port selector and the IP stack picks the outgoing interface from connected routes. Configure the interface mapped to XF51 with a non-overlapping subnet, leave XF50 to EtherCAT, and remove the eth0/eth1 bridge once each interface has its own valid path.

    Industrial networks

  • Troubleshooting

    Making an FX5U a Modbus TCP server for a KTP700 panel

    A SIMATIC KTP700 BASIC can only open Modbus TCP requests, so the FX5U must answer them as the server; enabling Modbus TCP in GX Works3 and TIA Portal together opens nothing. Prove the Ethernet path, enable the FX5U's Modbus TCP slave service in its Ethernet module parameters, point the panel connection at the FX5U address on port 502, and bind one test tag to a known register before scaling up.

    Industrial networks