Problem Overview: HMI Simulation Fails Across a Dual-Subnet S7-1500
A typical commissioning pain point on S7-1500 machines is the HMI simulation in TIA Portal: the engineering station can read/write the CPU without issue, but pressing Start Simulation on the Comfort Panel project produces no tag updates, no alarms, and a connection-status icon that never turns green. The reproduction is consistent: a CPU 1515-2 PN with two PROFINET interfaces, a TP1500 Comfort connected to one interface, and the engineering PC connected to the other.
The exact symptom from the field is shown in the table below.
| Device | Interface | IP Address | Subnet Mask | Connected To |
|---|---|---|---|---|
| CPU 1515-2 PN | X1 (PROFINET 1) | 192.168.148.10 | 255.255.252.0 (/22) | TP1500 Comfort HMI |
| CPU 1515-2 PN | X2 (PROFINET 2) | 192.168.150.10 | 255.255.252.0 (/22) | Engineering PC |
| TP1500 Comfort | PROFINET | 192.168.148.11 | 255.255.252.0 (/22) | PLC X1 |
| Engineering PC | Ethernet | 192.168.150.252 | 255.255.252.0 (/22) | PLC X2 |
With a /22 mask, the engineering PC can ping both 192.168.148.10 (PLC X1) and 192.168.150.10 (PLC X2). The PLC is online, HMI tags are visible, project download to the HMI works via S7 routing through the PLC. The single failing operation is the HMI Runtime simulation launched from the PC.
Root Cause: HMI Connection Target Is Unreachable From the PC
When a Comfort Panel project is built, the HMI connection stores a fixed partner (PLC) IP address. In this case, that partner is 192.168.148.10 (PLC X1). The HMI Runtime on the panel uses this address to open the S7 connection to the CPU. When you launch RT Simulation on the PC, the simulated Runtime runs on the engineering station and attempts the exact same connection to the same partner IP.
Look at the Layer-3 path the simulation must traverse:
- WinCC Runtime on the PC opens a socket to
192.168.148.10:102(ISO-on-TCP / S7 protocol port). - Windows checks the routing table. The PC's only interface is
192.168.150.252/22, which covers192.168.148.0through192.168.151.255. - The destination
192.168.148.10is on-link, so Windows sends an ARP for it on the local Ethernet. - No device on the PC's physical segment owns
192.168.148.10. The ARP fails, and the S7 connection times out.
Even though the PC and the HMI-target IP share the same /22 subnet in theory, the physical topology is split: the PC and the HMI target are on different broadcast domains separated by the CPU's two PROFINET interfaces. The CPU is acting as a Layer-3 boundary, not a transparent bridge.
This is the key behavior of an S7-1500 with two PROFINET interfaces as documented in the Siemens functional description: Rules for CPUs with several PROFINET interfaces (S7-1500). Each PROFINET interface is a separate IP subnet from a routing perspective, regardless of the configured mask. Two interfaces on the same CPU cannot be configured into the same logical subnet (no IP aliasing); they are always separate Layer-3 networks unless joined by an external router.
Why S7 Routing Helps Project Transfer But Not Simulation
S7 routing is a Siemens-specific mechanism that allows a TIA Portal client (PG) to traverse S7-1500 CPUs as routers to reach downstream stations such as HMIs, drives, or remote I/O. The CPU exposes routing entries that are inserted by TIA Portal during Go online > Accessible nodes. The S7 route allows a TIA Portal download to reach the TP1500 through the CPU at 192.168.150.10, even though the panel sits at 192.168.148.11.
The HMI Runtime connection is not an S7-routed path. The Runtime opens a direct S7 communication (ISO-on-TCP, port 102) from itself to the configured partner. There is no routing hop. So:
| Operation | Mechanism | Works in Dual-Subnet Setup? |
|---|---|---|
| TIA Portal → PLC online (X2) | Direct S7 to 192.168.150.10 | Yes |
| TIA Portal → HMI project transfer | S7 routing through CPU | Yes |
| TIA Portal → HMI online (X1 path) | Direct S7 to 192.168.148.11 | No, requires PC on that subnet |
| RT Simulation → PLC | Direct S7 from PC to 192.168.148.10 | No, target is on the HMI-side subnet |
| Real HMI Runtime → PLC | Direct S7 from 192.168.148.11 to 192.168.148.10 | Yes (panel is on that subnet) |
Solution Path 1: Add a Router Between the Two Subnets
The cleanest long-term fix is to deploy a Layer-3 router (or Layer-3 switch) between the two PROFINET segments and define explicit routes on the engineering PC. This converts the dual-subnet topology into a routable IP network while keeping the machine's two PROFINET segments logically separate (good for separating plant networks from machine networks).
- Install a small industrial router (e.g. SCALANCE XC-216, SCALANCE MUM856, or any managed switch with L3 capability) with two interfaces:
–eth0→ PLC X2 segment, IP192.168.150.1/22
–eth1→ HMI/PLC X1 segment, IP192.168.148.1/22 - Connect
eth0to the same switch as the PC and PLC X2, andeth1to the same switch as the HMI and PLC X1 (or direct cable if the topology is point-to-point). - On the engineering PC, add a persistent route so the S7 partner IP is reachable:
route -p ADD 192.168.148.0 MASK 255.255.252.0 192.168.150.1 - Verify with
tracert 192.168.148.10. The first hop should be the router at192.168.150.1. - Restart the TIA Portal HMI Runtime simulation. The connection should establish within a few seconds.
Solution Path 2: Change the HMI Connection Partner IP
If the goal is to keep the engineering topology minimal during development, change the HMI connection in TIA Portal to point to the PROFINET interface that the PC can already reach.
- Open the HMI device configuration in TIA Portal.
- Select Connections and open the S7 connection to the CPU.
- Change the Partner (PLC) IP address from
192.168.148.10to192.168.150.10(the X2 interface that the PC can reach). - Compile the HMI project and start RT simulation.
Trade-off: this connection IP is what the real panel will also use once deployed. If the panel is physically wired to X1, the production HMI will fail because it cannot reach 192.168.150.10 from 192.168.148.11. Two patterns are common in industry to handle this:
- Dual-compile workflow: maintain two HMI connection variants in the same TIA project, or use a connection switch in the project properties. Manually swap which connection is active before each simulation session.
-
Move the HMI to X2 subnet: rewire or re-IP the panel to
192.168.150.xso the production HMI and the PC share the same subnet, then use a separate switch for the I/O devices on X1. This is the simplest topology for greenfield machines.
Solution Path 3: Add a Second IP Address on the Engineering PC Interface
Windows can bind multiple IP addresses to a single physical interface. Adding 192.168.148.252/22 (or a host IP inside the HMI subnet) to the PC's Ethernet adapter allows the S7 partner IP to be reached directly, even though it lives on a different physical segment. This works only if there is a path – either an additional NIC plugged into the HMI switch, or a routed/L3 path through the CPU. Without one of those, the new IP has no route to the target.
Procedure for the dual-NIC variant (recommended over a single-NIC secondary IP):
- Install a second Ethernet adapter in the engineering PC or use a USB-Ethernet dongle.
- Connect it to the same physical switch as the TP1500 Comfort.
- Assign
192.168.148.252with mask255.255.252.0. - Verify with
ping 192.168.148.10andping 192.168.148.11from the PC. - Run the HMI simulation. The S7 partner IP is now on-link for the second NIC and the connection opens.
Solution Path 4: Use S7 Routing for Project Transfer Only
If the priority is to commission the real HMI (not simulate it) and the PC will never need to run the HMI Runtime on the engineering station, the existing S7-routing path is sufficient. TIA Portal will download the HMI project to the TP1500 by routing through the CPU. This is the standard Siemens-recommended approach for plant-side maintenance and is documented in the same TIA Portal functional description linked above.
To deploy:
- In TIA Portal, right-click the TP1500 device → Download to device → Accessible nodes.
- Select the route entry that points through the CPU 1515-2 PN at
192.168.150.10to the panel at192.168.148.11. - Confirm the download. The project is transferred via S7 routing, and the HMI Runtime on the real panel starts talking to the CPU on its own subnet.
Configuring the PG/PC Interface for TIA Portal
A frequent adjacent cause of "simulation sees the PLC but RT does not" is a mis-set PG/PC interface. The PG/PC interface assignment tells TIA Portal which Windows network adapter to use for S7ONLINE access. If the wrong adapter is selected, the project can be downloaded via routing (TIA does its own routing) but the simulated Runtime will follow the S7ONLINE assignment.
- Open Control Panel → Set PG/PC Interface (the classic applet, not the modern Settings app).
- Select the entry that lists the network adapter connected to the PLC X2 segment as the S7ONLINE access point.
- Apply, then close and re-open TIA Portal so the change takes effect.
| Access Point | Use For | Typical Selection |
|---|---|---|
| S7ONLINE | PG ↔ PLC online functions, HMI Runtime simulation | Adapter on the engineering PC segment |
| S7ONLINE (STEP 7) | Legacy routing entries, older S7 routes | Same as above for TIA V15+ |
Verification Checklist
After applying any of the solutions above, run through this matrix to confirm the topology is fully operational.
| # | Check | Expected Result | Command / Where |
|---|---|---|---|
| 1 | PC reaches PLC X2 | Reply <1 ms | ping 192.168.150.10 |
| 2 | PC reaches PLC X1 (after fix) | Reply <1 ms | ping 192.168.148.10 |
| 3 | PC reaches HMI (after fix) | Reply <1 ms | ping 192.168.148.11 |
| 4 | TIA Portal → PLC online | All blocks visible | Project tree → Online → Go online |
| 5 | TIA Portal → HMI online | HMI tags visible | HMI device → Online → Go online |
| 6 | HMI RT simulation | Tags update, status icon green | Project → Start RT simulation |
| 7 | Real HMI to PLC on X1 | Connection established, no alarms | HMI Control Panel → Connection |
| 8 | No PROFINET diagnostics | No station failure, no duplicate IP | TIA Portal → Online → Diagnostics |
Best-Practice Topologies for S7-1500 With Two PROFINET Ports
The dual-subnet pattern is common and valid; the failure mode above is a tooling/workflow issue, not a defect. Three topologies are stable in the field.
| Topology | PC Location | HMI Location | Simulation Possible? | Recommended For |
|---|---|---|---|---|
| Two subnets, no router | Subnet A (X2) | Subnet B (X1) | No (without rewiring) | Isolated machine network, no engineering access |
| Two subnets + L3 router | Subnet A | Subnet B | Yes | Plant-wide networks, segmented machine networks |
| Single subnet, shared switch | Same switch as PLC/HMI | Same switch as PLC | Yes (always) | Standalone machines, OEM test cells, commissioning |
For new machines where the commissioning team will need frequent HMI simulation, choose the third topology: put the HMI, the engineering PC, and the CPU's X1 interface on a single managed switch with one IP subnet. Use X2 for higher-level plant communication (HMI of an upstream line, MES, or another controller). The CPU's two PROFINET ports make this segmentation natural.
Quick Diagnostic Procedure
Use this sequence to localize the failure in under five minutes.
-
ipconfig /allon the PC – confirm the active adapter has the expected IP192.168.150.252and mask255.255.252.0. -
arp -a– confirm the PC's ARP table contains192.168.150.10(PLC X2). If not, the PLC X2 is unreachable and the entire stack is broken. -
ping 192.168.150.10– should reply. If it times out, the local segment is the fault. -
ping 192.168.148.10– if this fails and step 3 succeeded, the Layer-3 boundary at the CPU is confirmed. Apply Solution 1, 2, or 3 above. - Open the HMI connection in TIA Portal and note the partner IP. Confirm the PC has a Layer-3 path to that exact IP.
- Open TIA Portal → Online → Accessible nodes → filter by the partner IP. If the partner IP is not listed, the PC cannot reach it directly.
- Start RT simulation with the TIA Portal diagnostic view open. The connection error message typically reads "Connection interrupted / HMI tag: status: connection failure" for the S7 partner. The fault is Layer-3 reachability, not tag configuration.
Edge Cases and Field Notes
-
TP1500 Comfort on a /22 mask. A /22 mask does not change the fact that the two PROFINET ports are separate subnets. The mask only widens what the PC can ARP for on its own physical segment. If the PC is physically attached to X2, ARP for
192.168.148.10still fails because no device on the X2 switch responds to it. - CPU 1515-2 PN vs. CPU 1515F-2 PN. The same rules apply; the F-variant adds PROFIsafe on either port, but Layer-3 behavior is identical.
- Firmware differences. The dual-interface routing rules are documented in the TIA Portal functional description for S7-1500 CPUs and are firmware-agnostic. TIA Portal V13, V15, V16, V17, V18, and V20 all implement them the same way. If an older project appears to work in V13 but not V15, the cause is usually a change in the TIA Portal simulation launcher (the HMI simulation was a separate executable in older versions), not a CPU behavior change.
- S7-1200 vs. S7-1500. The same advice applies to S7-1200 with two PROFINET interfaces (CPU 1215C, 1217C). The two PROFINET ports are still separate Layer-3 networks.
- ET 200SP / IM 155 as a router. PROFINET IO devices are Layer-2 only and do not route. A PROFINET device in subnet A cannot be reached from subnet B without a router.
References to Official Documentation
- Siemens TIA Portal functional description: Rules for CPUs with several PROFINET interfaces (S7-1500)
- Siemens SIMATIC S7-1500 CPU 1515-2 PN manual (6ES7515-2AM02-0AB0) – device manual and PROFINET interface specifications.
- SIMATIC HMI TP1500 Comfort device manual (6AV2 124-1QC02) – PROFINET connection, IP configuration, and S7 routing notes.
Why does TIA Portal reach the PLC but HMI simulation says connection failure?
Because the HMI Runtime simulates a real panel connection. The TIA Portal PG/PC interface can use S7 routing through the CPU, but the simulated Runtime opens a direct S7 socket to the partner IP stored in the HMI connection. If that partner IP is on a subnet the PC cannot reach (a different physical segment of the CPU), the connection fails. The PLC online status is independent of the HMI Runtime connection status.
Can the TP1500 Comfort be simulated when the engineering PC is in a different subnet than the HMI?
Yes, but only if the PC has a Layer-3 path (router, second NIC, or routed connection) to the HMI's S7 partner IP. Without a router, the simplest way is to put the HMI, the PC, and the PLC's X1 interface on the same physical switch and subnet. The default S7-routing path allows project transfer but not Runtime simulation.
Does a /22 subnet mask (255.255.252.0) make the two PROFINET ports one network?
No. A /22 mask only widens the IP range a host considers local. Each PROFINET interface on an S7-1500 is a separate Layer-3 network. The CPU does not bridge or route between its own PROFINET ports, and the two ports cannot be assigned IPs in the same subnet. Devices on X1 and X2 cannot ARP for each other without a router in between, regardless of mask.
Can I keep the production HMI on X1 and still simulate from a PC on X2?
Yes, by adding a router between the two subnets and a static route on the PC, or by giving the PC a second NIC on the X1 switch. Both approaches keep the real panel production topology intact and let the engineering station simulate the HMI project. Changing the HMI connection's partner IP to 192.168.150.10 also works for simulation but breaks the real HMI if the panel stays wired to X1.
Does S7 routing solve the simulation problem?
No. S7 routing is used by TIA Portal to push a project from the PG to a downstream HMI or station through the CPU. The HMI Runtime does not use S7 routing for its cyclic S7 connection to the PLC; it uses a direct ISO-on-TCP connection. S7 routing can fix "cannot download to the HMI" but cannot fix "HMI simulation cannot reach the PLC."