How-to
Configure the ctrlX CORE XF51 port for a second Modbus TCP network
Short answer
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.
On this page
- Can the ctrlX PLC open a second Modbus TCP network on XF51?
- Which interface is XF51: eth0 or eth1?
- What address goes on the XF51 interface for the second network?
- Why is the same subnet on eth0 and eth1 not allowed?
- Can the eth0/eth1 bridge be removed once XF51 is configured?
- How do you prove the requests actually leave through XF51?
- Questions asked
Yes, and you do it in the web interface, not in the PLC program. The ctrlX PLC application uses every Ethernet interface on the controller, and CXA_ModbusTCP version 1.8.0.1 has no port selector because none is needed: the client names the server's IP address, and the controller's IP stack picks the outgoing interface from the connected route that matches it. So the second network is built by configuring the interface mapped to XF51 with its own non-overlapping subnet in Settings → Connectivity, keeping XF50 out of it as EtherCAT-only, and removing the eth0/eth1 bridge once each interface has a valid path of its own. The steps below take it in that order.
Can the ctrlX PLC open a second Modbus TCP network on XF51? #
Yes: XF51 is a standard Ethernet port and Modbus TCP rides on IP, so the PLC application reaches it as soon as the interface behind it carries a valid address. The request path is PLC client, then the controller's IP routing table, then the Ethernet interface, then the server's IP address; no port designation exists anywhere in the library, and that is correct behavior rather than a limitation. The same routing logic is why a PLC can run two Modbus networks at once (see how a PLC runs two Modbus networks at the same time) — the interface follows the address, and the address follows the subnet you configure.
The physical ports divide cleanly for this job:
| Port | Role in this installation | Decision |
|---|---|---|
| XF10 | Engineering connection carrying the working Modbus TCP traffic | Leave it as it is while you commission the second network |
| XF51 | Standard Ethernet port, free for Ethernet-based protocols | Use it for the second, physically separate IP network |
| XF50 | Dedicated to EtherCAT | Exclude it from Modbus TCP entirely |
Which interface is XF51: eth0 or eth1? #
Open Settings → Connectivity in the ctrlX CORE web interface and you will see two interfaces, eth0 and eth1; eth0 already carries the address your PLC program uses today, so XF51 is the other one, but you confirm that by link state rather than by assuming the numbers follow the connectors. Interface names follow the operating system, not the silkscreen, and the same confusion between port labels and interface numbers comes up whenever an EtherCAT or Ethernet master has to pick eth0 or eth1.
Confirm and record the mapping like this:
- Read the addresses, prefix lengths, link states and any bridge membership shown for eth0 and eth1, and write them down before changing anything.
- Identify which interface carries your current engineering session and the working Modbus traffic; that is the one behind XF10.
- In a controlled commissioning window, unplug the cable at XF51 and watch which interface's link state drops; that interface is your second network's interface.
- If both interfaces are already members of a bridge, record the bridge configuration first — a bridge creates one shared Layer 2 path, and an address on a bridge must not be treated as though it belongs to an independently routed member port.
One caution belongs here: changing the existing eth0 address can cut both your engineering access and the live Modbus connections at the same time, so eth0 keeps its address and the new subnet goes onto the XF51 interface only.
What address goes on the XF51 interface for the second network? #
Give it a host address from a subnet that does not overlap the one on eth0, and no gateway is needed, because a directly connected destination leaves through the interface whose connected route matches it. Here is a worked example with example values: suppose eth0 keeps 192.168.5.1/24, and the second network's devices are addressed from 192.168.6.20 upward. Assign the XF51 interface 192.168.6.1/24.
The arithmetic: a /24 prefix is the mask 255.255.255.0, so the interface's connected route is 192.168.6.0/24 with usable hosts 192.168.6.1 through 192.168.6.254 and broadcast 192.168.6.255. The first Modbus server at 192.168.6.20 falls inside that route, so the client request to 192.168.6.20 leaves through the XF51 interface with no static route and no gateway. The eth0 route 192.168.5.0/24 shares no addresses with it, so the routing table has exactly one match for every destination on either network — which is the whole requirement.
Then configure the CXA_ModbusTCP client connection for that server with its IP address and its Modbus TCP port (conventionally port 502), and leave any local-address binding option unset unless you deliberately want the connection tied to one interface.
Why is the same subnet on eth0 and eth1 not allowed? #
Because two independent interfaces cannot both own one connected route without ambiguity. The classic error is assigning 192.168.5.1/24 to both interfaces: that duplicates the host address on the device and installs the same connected subnet on two interfaces, so the IP stack has two equal paths to every destination in it and address resolution answers can arrive on the wrong one. The arrangement decides the fix:
| Address arrangement | Routing effect | Next action |
|---|---|---|
| Separate, non-overlapping subnets, one per interface | Each destination subnet has exactly one interface path | Test reachability from the controller |
| The same /24 with the same host address on both interfaces | Duplicate host address, competing connected routes | Correct the addressing before anything else |
| Different host addresses but the same subnet on both interfaces | Still competing paths to one destination subnet | Separate the subnets or redesign the topology deliberately |
| Several non-overlapping addresses on one interface | Several IP networks over one physical cable | Use only when physical separation is not the goal |
Overlapping routes must be resolved before you touch anything in the library; a longer timeout has never fixed a wrong subnet.
Can the eth0/eth1 bridge be removed once XF51 is configured? #
Yes, once each interface has its own valid IP path the bridge is unnecessary, because Modbus TCP never needed one — the bridge workaround only worked by giving both ports a shared Layer 2 path, the same mechanism described in this guide to bridging eth0 and eth1 on an industrial controller. Before you delete it, open the installed CXA_ModbusTCP connection configuration and check two things: the remote address of every connection, and whether any connection has an explicit local address bound. With no local binding, routing alone decides the outgoing interface and the bridge can go. With a local address bound, that address must belong to the interface you intend the traffic to use, and it must still exist after the bridge is removed — an address that lived on the bridge disappears with it.
How do you prove the requests actually leave through XF51? #
Test from the controller's own network context, not from your engineering computer, because the computer may have a different subnet, route or firewall path and a pass from it proves nothing about the PLC. Read the client connection status in the PLC app and, where capture facilities are available, watch traffic on the interface you identified as XF51 while a request runs. The stopping point tells you which layer owns the fault:
| Reading at the XF51 interface | Meaning | Next check |
|---|---|---|
| No address-resolution response for a local destination | The device is not reachable at the Ethernet layer | Device power, address, subnet mask, cabling, switch configuration, duplicate addresses |
| Address resolution succeeds but the TCP connection fails | The Ethernet path works; the service is blocked or unavailable | The server's configured port, server enablement, access controls, connection capacity |
| TCP connects but Modbus returns an exception | The request reached a Modbus endpoint | Function code, register range, quantity, gateway destination selection |
| Valid responses arrive but the values are wrong | Transport is fine; interpretation is off | Register addressing convention, data type, word order, scaling |
The same discipline applies when the first network misbehaves — if the XF10 side ever stops responding, the layered checks in why a ctrlX CORE PROFINET device is not found with XF10 connected separate a link problem from a routing problem the same way. Change one setting at a time and read actual values instead of guessing: the subnet check comes first, the route second, and the library last, because in this architecture the library was never the problem.
Questions asked
Can the XF50 port carry Modbus TCP as well?
No. XF50 is dedicated to EtherCAT only on the ctrlX CORE, so it is not available for Modbus TCP or other Ethernet-based protocols. Only XF10 and XF51 can serve as standard Ethernet ports, and those two are the interfaces your Modbus networks can use.
Could a second IP address on eth0 replace the XF51 network?
Yes, one port accepts several non-overlapping IP addresses, and the PLC application reaches all of them. But that gives you two IP networks on one cable and one broadcast domain, not the physical separation a second port provides. Choose it only when cable separation does not matter; use XF51 when it does.
Does the controller route traffic between the eth0 and eth1 networks by itself?
No. Two interfaces with separate subnets give the PLC application a path to both networks, but forwarding traffic through from one to the other is a separate configuration decision on the controller. Devices on the XF51 network do not become reachable from the XF10 network just because the controller sits on both.
How many Modbus TCP servers can the ctrlX CORE client address?
The CXA_ModbusTCP client documentation does not publish a fixed count of server connections or a register limit per request, so no number can be stated here. What is documented is the mechanism: each configured connection names a server IP address, and every server on any directly connected subnet of the controller is reachable that way.