How-to
Reach a safety PLC over EtherCAT EoE from a Windows PC
Short answer
Enable IP forwarding on both XF10 and eoe0 on the ctrlX CORE, activate the gateway's Virtual Ethernet port in the EtherCAT configuration, and add a persistent Windows route to 172.31.0.0/16 with the CORE's PC-side address as next hop. The safety tool then reaches the gateway over the EtherCAT cable with no separate service connection.
On this page
Enable IP forwarding on XF10 and eoe0 in the ctrlX CORE web interface, activate the Virtual Ethernet port checkbox on the SICK Flexi Soft EtherCAT gateway in ctrlX I/O Engineering, and add one persistent Windows route whose next hop is the CORE's address on the PC-side network. Those three settings are the whole job: the safety engineering tool then reaches the safety controller through the EtherCAT cable, with no separate service connection to the gateway.
The name "port forwarding" is a misnomer here — nothing maps a TCP or UDP port. The CORE routes IP between its PC-side interface and eoe0, the virtual adapter that carries Ethernet over EtherCAT (EoE) inside the fieldbus telegram. These steps are written against ctrlX CORE V1.18, ctrlX CORE EtherCAT Master App V1.18, ctrlX PLC Engineering V1.18 and ctrlX I/O Engineering V1.18; later releases can move a menu item.
The path you are building #
The request leaves the PC as ordinary IP, enters the CORE on XF10, is forwarded to eoe0, crosses the EtherCAT segment as EoE, and ends on the gateway's virtual Ethernet port — in the documented example, the host 172.31.254.3. Each stage has its own proof of readiness:
| Element | Role | Proof it is ready |
|---|---|---|
| Windows engineering PC | Originates the connection | One active adapter, known address |
| XF10 | PC-side routed interface on the CORE | Web interface reachable from the PC |
| eoe0 | EoE-side routed interface on the CORE | Listed in Network Interfaces |
| EtherCAT segment | Carries EoE inside the telegram | Gateway found by Scan for Devices… |
| Virtual Ethernet port | Terminates the tunnel at the gateway | Checkbox active, address on the EoE tab |
The PC end can be a service laptop or a fixed machine-side station. When the station is permanent, choose an industrial panel PC for the safety engineering station and keep the persistent route on it, so commissioning never depends on whichever laptop is free that day.
EoE is not the only tunnel that rides this fieldbus: reading IO-Link parameters over EtherCAT AoE from a ctrlX PLC uses the ADS protocol over EtherCAT instead of an IP tunnel — different mechanism, different settings, same cable.
Enable IP forwarding on both CORE interfaces #
The PC addresses the gateway, not the CORE, so the CORE must forward transit traffic: in on XF10, out on eoe0, with the reply taking the reverse path. Reaching the CORE web interface proves local delivery only; it says nothing about transit.
- Open the ctrlX CORE web interface.
- Open Settings > Network Interfaces.
- Select eoe0 and switch on Enable IP forwarding.
- Select XF10 and switch on Enable IP forwarding.
- Reload the page and confirm both switches still read on before you change anything further down the path.
One caution belongs here: forwarding makes the safety controller reachable from every host on the PC-side network, and routing authenticates nobody. Restrict which hosts or subnet may reach XF10 using the site's own network controls, and treat forwarding as an engineering access you switch off when the work is done.
Activate the gateway's virtual Ethernet port #
Detection is not activation. The device scan finds the gateway as an EtherCAT SubDevice, but its EoE endpoint stays dark until the checkbox is set.
- Open ctrlX I/O Engineering.
- In the project tree, right-click ethercatmaster and choose Scan for Devices… — the same scan used when routing an IO-Link master to a ctrlX CORE over EtherCAT.
- Double-click Flexi_Soft_Ethercat_Gateway.
- Activate the checkbox Virtual Ethernet port.
- Open the ethercatmaster window and select EoE, then read the gateway's IP address and station address.
In the documented example the EoE tab shows 172.31.254.3 with station address 3, so the station number appears as the final octet and nothing more. On EoE devices that expose a default-gateway field of their own, that field takes the master-side interface address, not the plant router. Resolve a missing or mis-associated gateway entry here, before any route is added.
Add the route on the Windows PC #
The PC's default gateway does not know that this network lives behind the CORE; without a specific entry, traffic for the safety PLC goes to the plant router and dies. The entry says: for that destination, the next hop is the CORE address you already use for the web interface — never the gateway address, which only becomes reachable once the route works. The rule is general on routed links — the specific next hop must own the path — and it is the same reason a peer route is needed, not just a default, on a routed tunnel.
A setup where the PC itself is the EtherCAT master would instead give the PC a virtual TAP adapter for EoE; here the master is the CORE, so the PC needs nothing but the route.
- On the Windows 10 PC, run cmd as administrator.
- Run
route printand note any destination overlapping 172.31.x.x, including routes installed by VPN adapters. - Add the persistent entry; the exact command, with the next hop resolved for the installation, is worked out in the next section.
- Run
route printagain and confirm destination, mask, next hop and the persistent flag. - If a more specific entry covers the gateway address, remove or narrow it rather than adding the same route twice — the longest prefix wins.
Working the route for a gateway at 172.31.254.3 #
Inputs, each with its source:
- Gateway EoE address: 172.31.254.3, read from the EoE tab in ctrlX I/O Engineering (documented example value).
- Station address: 3, same tab — recorded only so nobody builds an address from it.
- Mask: 255.255.0.0, from the documented route command.
- Next hop: the CORE's address on XF10, which belongs to the installation; this example uses 192.168.1.50 wherever yours belongs.
The rule in words: a route entry covers every address whose bit-by-bit AND with the mask equals the entry's destination, and the next hop must sit on a subnet the PC already reaches directly.
The arithmetic:
- 255.255.0.0 is sixteen one-bits followed by sixteen zero-bits — a /16. The mask keeps the first two octets and forces the last two to zero.
- Network containing the gateway: 172 AND 255 = 172; 31 AND 255 = 31; 254 AND 0 = 0; 3 AND 0 = 0. Result: 172.31.0.0.
- Coverage: host addresses 172.31.0.1 through 172.31.255.254, which contains 172.31.254.3.
- Next-hop reachability: a PC adapter at 192.168.1.10 with mask 255.255.255.0 shares subnet 192.168.1.0/24 with 192.168.1.50, so the hop is one delivery on the local wire.
- Command, with the example next hop:
route add -p 172.31.0.0 MASK 255.255.0.0 192.168.1.50
The documented form of the command writes the destination as 172.31.254.0 under the same mask. The mask, not the typed destination, defines membership, so both forms produce the same /16 route, and route print lists the entry under 172.31.0.0; writing the network address keeps what you type equal to what the table shows.
Result: one persistent /16 entry, next hop the CORE, the gateway reachable with no port mapping anywhere.
The decision: keep the /16 when more EoE devices can appear anywhere in 172.31.x.x, because the single entry then reaches all of them. Narrow to route add -p 172.31.254.0 MASK 255.255.255.0 192.168.1.50 when only the gateway subnet should travel through the CORE; that /24 still reaches 172.31.254.3. The threshold is a second 172.31 subnet over EoE — needed or plausible, keep the /16; ruled out, take the /24.
Point the safety tool at the gateway #
- Start SafeLogic Designer 1.8.0 SP1.
- Edit com. interface settings and select communication through the gateway, at the address read from the EoE tab.
- Close that dialog and open the communication settings.
- Run the communication check, and activate the profile only after it succeeds.
Routing is finished by then. If the communication settings ask for a service port or a timeout, the number lives in those settings or in the gateway documentation; the routing procedure specifies none, and no port-mapping rule belongs in this setup.
Prove the path is the EoE path #
- Count the cables: the gateway has no Ethernet service line of its own, so the PC's one link plus the EtherCAT cable is the entire path. Working with the service socket empty is the acceptance test.
- Confirm the entry:
route printshows the destination, the mask, the CORE as next hop and the persistent flag. - Treat a ping result as gossip, not evidence — the tool's communication check is the verdict.
- On failure, walk the path in order: does the PC select this route (a capture on the PC adapter shows requests leaving and replies returning), does the request arrive at the CORE, is forwarding still on for both interfaces, does the gateway respond. Fix the first broken stage, then retest.
Questions asked
Is the EoE IP address the same as the EtherCAT station address?
No. In the documented example the station address 3 appears only as the last octet of 172.31.254.3; the first three octets come from the EoE configuration and are whatever the installer set. Read the address from the EoE tab of the EtherCAT master and use that value in the route and in the engineering tool. Deriving a full address from the station number alone points the tool at the wrong host.
A ping to the gateway fails. Is the route wrong?
Not necessarily. A gateway can ignore ICMP while its engineering service answers, or answer ICMP while the service is stopped, so a ping proves neither side. Judge the path with route print, checking destination, mask, next hop and the persistent flag, and judge the service with the tool's communication check. A packet capture on the PC adapter settles whether requests leave and replies come back.
The task is called port forwarding. Where is the port mapping?
Nowhere, and none is needed. The phrase is used loosely for reaching a device through an intermediate box; what actually happens here is IP routing between two interfaces, and EoE carries whole Ethernet frames, so any TCP or UDP port the tool uses rides the routed connection unchanged. If the tool's communication settings name a service port, take the number from those settings or from the gateway documentation.
Does the route survive a PC reboot?
Yes, the -p flag makes the entry persistent. Verify with route print after a reboot. The only thing that outranks it is a more specific route to the same address from a VPN adapter or another interface, because the longest prefix wins, so a VPN's /24 beats your /16. Remove or narrow the overlap instead of adding the same route twice.
Will this also reach other EoE devices on the same master?
Yes. Forwarding and eoe0 belong to the CORE, not to the gateway, so they carry any SubDevice whose virtual Ethernet port is enabled and whose address the EoE tab lists. A 172.31.0.0/16 route reaches all of them; when those devices sit in several different 172.31 subnets, that is precisely the case for keeping the /16 rather than narrowing to a /24.