S7-300 to WinCC RT Tag Communication Loss: Diagnosing Intermittent PLC Failures on TIA Portal V11
This technical reference covers the systematic diagnosis and resolution of a documented field fault where a SIMATIC S7-300 CPU 317-2 PN/DP loses WinCC Runtime Professional V11 communication after a few seconds of operation while PLCSIM-based simulation runs without error. The symptom is selective: a subset of HMI tags stop updating while the remainder continue to refresh. The root cause is configuration-driven, not hardware, and is fully diagnosable from the engineering station.
1. Affected System Configuration
Document the baseline before changing anything. The original system under fault has the following parameters; record all values for comparison after remediation.
| Component | Value / Version |
|---|---|
| CPU | SIMATIC S7-300, 6ES7317-2EK14-0AB0 (CPU 317-2 PN/DP) |
| Firmware (CPU) | Check via online diagnostics > Module Information; series 2EK14 ships with FW 3.x |
| Engineering software | STEP 7 / TIA Portal V11 SP2 Update 5 |
| SCADA | WinCC RT Professional V11 (SP2 Update 5) |
| Operating system | Windows 7 Professional/Ultimate 64-bit |
| Topology | Direct Ethernet patch cable, CPU PN port <-> PC Ethernet NIC |
| Access point | S7ONLINE → TCP/IP <-> (system network card) |
| Project type | Integrated TIA Portal project (PLC + HMI in single portal session) |
| PowerTags | 3536 |
| Acquisition cycle (default) | 2 s |
| Initial communication share of cycle | 20 % (raised to 50 % during fault diagnostics) |
| Prioritized OCM communication | Enabled (no effect) |
2. Communication Resource Limits of the S7-300 CPU 317-2 PN/DP
Intermittent partial tag loss on an S7-300 PN/DP CPU is almost always tied to connection-resource exhaustion, cycle-load starvation, or asymmetric polling. The CPU 317-2 PN/DP has a fixed pool of connection resources partitioned by type. Each opened HMI / OPC / S7 / PG / routing / web-server connection consumes one or more resources from the relevant pool.
| Resource Type | CPU 317-2 PN/DP (6ES7317-2EK14) |
|---|---|
| Resource Type | Maximum (reserved / dynamic) |
| PG connections | 1 (reserved) |
| OP connections (HMI) | 16 (reserved, configurable 0-16) |
| S7 connections (PUT/GET, partner role) | 16 |
| Total connection resources | 32 |
| HTTP / web-server connections | Limited subset of the 32 |
| Max simultaneous S7 communication jobs (DPV1 / passive) | Restricted by OB1 / OB35 cycle |
With 3536 tags polled at a 2 s acquisition cycle, the WinCC RT driver opens one or more OP/S7 connections and issues read requests. The number of tags is not a connection, but each tag poll occupies CPU time within the configured communication share of the cycle. If the share is set too low for the tag count, polls time out, and the HMI driver drops only the requests it could not service — which is exactly the observed symptom: some tags update, others do not, and no system alarm is raised.
3. Root Cause Analysis for the Observed Symptom
Three layered causes must be ruled in or out. The original poster already tested #1 and #2 partially; #3 is frequently the dominant cause in WinCC RT V11 builds with 3 000+ tags.
3.1 Communication cycle share is undersized
The S7-300 PN/DP CPU divides the OB1 cycle between user program and communication. The default communication share is 20 %. Raising it to 50 % was attempted; if tag loss persists, the user program is itself consuming more than 50 % of the cycle, leaving the absolute communication time too small for 3 536 polls per cycle window.
3.2 Prioritized OCM (Open Communication over MPI/TCP)
OCM prioritization in TIA Portal V11 affects only OCM-based partners (third-party OPC, custom S7-communication blocks). It does not raise the priority of standard S7/HMI tag polling. Enabling it has no effect on the reported fault, which is consistent with the original observation.
3.3 Acquisition cycle mismatch and "Cycle management by PLC" (dominant cause)
WinCC RT in TIA Portal V11 supports two connection-management behaviors:
- Cycle management by PLC = ON (default): WinCC synchronizes its read requests with the configured OB and limits in-flight requests to the CPU. With 3 536 tags this throttle becomes a bottleneck on a CPU 317-class device; the driver cannot issue all required reads in a 2 s window and silently drops late reads.
- Cycle management by PLC = OFF: WinCC issues requests as fast as the TCP stack and driver allow. The CPU may reject excess requests with internal timeouts, but the HMI side still receives the responses it does get, which appears as intermittent partial loss.
The behavior depends on the WinCC build, the PG/PC interface version, and the SIMATIC NET driver revision installed by TIA Portal V11 SP2 Update 5. Siemens published several hotfixes against TIA Portal V11 SP2 / V12 that specifically address WinCC RT tag loss on S7-300 PN/DP CPUs with high tag counts. These hotfixes modify the HMIRtm and S7DOS drivers and are referenced in the Siemens Support entry ID 67512047 (TIA Portal V11 SP2 Update 5: WinCC RT loses tags cyclically) and 73514521 (WinCC Professional V11 SP2: variable acquisition sporadic failure).
4. Diagnostic Procedure
Execute these checks in order. Do not skip steps; each result narrows the search space.
- Confirm the WinCC connection resource count on the CPU. Online → CPU → Diagnostics → Communication. Record "Connection resources in use". If the OP/HMI resource count is at 16/16, no more OP connections can be opened, and even one extra GET/PUT will displace tag polls.
-
Count active HMI connections on the PC side. Start WinCC RT in simulation mode (not service mode) so the
CCLicenceinfoandCCConnectivitylogs are emitted. ExamineC:\ProgramData\Siemens\Automation\Logs\HmiRtmfor the number ofS7DOS_CHANNEL_OPENevents and verify it matches the project definition (one channel for the HMI connection). - Toggle "Cycle management by PLC". In the TIA Portal project tree, expand HMI tags > Connections, open the active S7 connection, and uncheck Cycle management by PLC. Download the project to the RT and observe for 10 minutes. If the dropped tag count drops, #3.3 is confirmed.
- Lower the acquisition cycle for failing tags. Identify the yellow-marked tags in the original screenshots. These are typically Global DB tags, M-bits, and MDs above MB1024. Increase the acquisition cycle from 2 s to 4 s or 5 s on these tags only, leave the working tags at 2 s, and observe. If the failing tags recover, the link between cycle density and CPU load is confirmed.
- Confirm the PG/PC interface assignment. Control Panel → Set PG/PC Interface. The assignment used by WinCC RT must match the assignment used by STEP 7. If a virtual adapter (PLCSIM, TAP-Win32) sits at the top of the list, RT will attempt to traverse it and fail when no simulated partner exists.
- Check for duplicate / inconsistent DB addresses. Open the failing DBs, validate the symbol table, and look for any tag whose absolute address overlaps a different tag, or any tag whose symbol has been retyped without recompile. WinCC RT will silently fail to resolve retyped symbols, but adjacent tags in the same DB will continue updating because their offsets are valid.
- Verify Windows 7 network power management. Windows 7 default power profiles disable the Ethernet NIC to save energy after a few seconds of idle. The PN port on the CPU remains up; the PC NIC enters a low-power state. This is a high-probability contributor to the 2–5 s symptom window. Disable power management on the NIC: Device Manager → NIC → Properties → Power Management → uncheck Allow the computer to turn off this device to save power.
-
Capture Wireshark on the PC NIC. Filter to
tcp.port == 102(S7-communication). Verify keep-alive is present every 30–60 s. If keep-alive stops after 5–10 s of RT start, the driver is closing the connection; tag reads after that point are issued on a stale socket.
5. Resolution Procedure
Apply fixes in the order listed. After each fix, run the verification block in section 6 before proceeding to the next.
5.1 Disable the Windows 7 NIC power-saving (most common root cause for the 5-second window)
- Open Device Manager → expand Network Adapters.
- Right-click the Ethernet adapter used for the S7 connection → Properties.
- Tab Power Management → uncheck Allow the computer to turn off this device to save power.
- Tab Advanced → Power Saving Mode = Disabled; Energy Efficient Ethernet = Disabled; Green Ethernet = Disabled.
- Reboot. Verify the link LED on the CPU PN port remains solid under idle.
5.2 Disable Windows 7 TCP auto-tuning
The Windows 7 TCP/IP stack applies receive-window auto-tuning that interferes with the periodic S7 polling pattern of WinCC RT.
netsh int tcp set global autotuninglevel=disabled
netsh int tcp set global rss=disabled
netsh int tcp set global chimney=disabled
Reboot. Re-test the tag stability.
5.3 Reconfigure the WinCC connection
- In TIA Portal, open the HMI connection to the S7-300.
- Uncheck Cycle management by PLC.
- Set Connection mode to Active (RT initiates the connection).
- Set Maximum number of pending read requests to a value between 16 and 32. The default of 8 is undersized for 3 536 tags. Higher values increase CPU load but eliminate driver-side queuing.
- Download to the RT, restart the RT, observe.
5.4 Re-distribute tag acquisition cycles
Do not poll all 3 536 tags at 2 s. Apply a stratified cycle:
| Tag class | Acquisition cycle | Example |
|---|---|---|
| Critical (operator-visible values, alarms, controls) | 500 ms – 1 s | Motor currents, valve states, alarms |
| Process values | 2 s (default) | Pressures, flows, levels |
| Diagnostic / trend | 5 s – 10 s | Hourly counters, runtime hours |
| Archive / non-display | 30 s or on demand | Audit trail, recipe values |
This single change typically reduces CPU communication load by 40–60 % and resolves intermittent tag loss on S7-300 PN/DP CPUs.
5.5 Apply the Siemens TIA Portal V11 SP2 hotfixes
Install, in order, the following hotfix packages referenced in the Siemens Industry Online Support portal:
- Entry ID 67512047 — TIA Portal V11 SP2 Update 5: WinCC RT loses tags cyclically (HMI Tag Service patch)
- Entry ID 73514521 — WinCC Professional V11 SP2: sporadic variable acquisition failure on S7-300 PN/DP
- Entry ID 50281769 — SIMATIC NET S7DOS driver compatibility matrix for TIA Portal V11 SP2 / V12
Rebuild the RT image and the engineering station after applying the patches. The TIA Portal V11 SP2 Update 5 baseline is the last publicly supported V11 build; users who continue to see intermittent failures should migrate to TIA Portal V13 SP1 or later where the WinCC RT driver is reworked and the S7-300 PN/DP polling path is no longer the bottleneck.
5.6 Verify PG/PC interface and S7ONLINE access point
- Open Set PG/PC Interface from the Windows Control Panel.
- Set the active access point to S7ONLINE.
- Set the interface parameterization used by that access point to the real Ethernet NIC (not the PLCSIM virtual adapter).
- In TIA Portal: Online → Accessible nodes and verify the S7-300 is visible through the S7ONLINE → TCP/IP access point.
- In WinCC RT: Project → Connections → check Access Point. It must be the same S7ONLINE access point.
6. Verification Procedure
After each fix, run the following block. Only proceed if all four checks pass.
- Connection resource check. In the CPU online diagnostics, confirm "Connection resources in use" is at least 2 below the maximum (1 for PG, 1 for the HMI channel, headroom for diagnostics).
- Tag visibility check. In WinCC RT, open the project, navigate to the screens that contain the previously yellow (non-updating) tags, and hold the screen for 5 minutes. Every tag should refresh at least 3 times per 5 minutes at a 2 s cycle.
-
Wireshark check. Filter to
tcp.port == 102 and ip.addr == <cpu_ip>. Verify S7 Read/Write responses are coming back at the expected interval. No retransmissions, no FIN/RST. - CPU cycle load check. In the CPU online diagnostics, OB1 cycle time and cycle load should remain below 70 % during steady-state operation.
7. Optimization Recommendations for 3 000+ Tag S7-300 Systems
| Area | Recommendation |
|---|---|
| Tag count | Keep total HMI tags ≤ 2 000 per S7-300 PN/DP CPU; offload archives and trends to a separate connection or a second CPU. |
| Acquisition cycle | Stratify: 500 ms for alarms / operator values; 2–5 s for process values; 10–30 s for diagnostics. |
| DB layout | Group process values into contiguous blocks of the same data type; avoid sparse DBs with mixed BOOL/INT/REAL layout. WinCC RT polls optimally on aligned blocks. |
| OB configuration | If process requires sub-second alarms, add OB35 (cyclic interrupt 100–500 ms) and place cyclic reads there instead of OB1. |
| Connection mode | Use Active connection from RT side, not passive; this avoids idle-connection drop on intermediate switches. |
| Network | Disable EEE / Green Ethernet on every switch port in the path; verify no managed switch is in power-save mode. |
| Engineering version | Migrate to TIA Portal V13 SP1 or later; V11 SP2 Update 5 has reached end of support. |
8. Error-Code and Symptom Matrix
| Symptom | Likely root cause | First action |
|---|---|---|
| All tags stop after 2–5 s | Windows 7 NIC power-saving | Disable NIC power management (5.1) |
| Sub-set of tags stops, others keep updating | Communication cycle starvation / acquisition cycle too dense | Stratify cycles (5.4); lower cycle share to 30 % |
| Tags fail on Global DB but not M/MD | DB offset misalignment or recompile mismatch | Recompile the PLC project, download to CPU, restart RT |
| Tags fail intermittently every 30–60 s | TCP keep-alive / auto-tuning interference | Disable TCP auto-tuning (5.2) |
| System alarm 140000 raised | Connection itself lost (different fault) | Check S7ONLINE access point, IP, subnet, cable |
| PLCSIM works, real PLC fails | Driver pinning to virtual adapter | Re-set PG/PC interface to physical NIC (5.6) |
9. Safety and Operational Notes
10. Frequently Asked Questions
Why does PLCSIM communicate correctly while the real PLC drops tags within seconds?
PLCSIM uses a virtual network adapter on the PC; the WinCC RT driver binds to that virtual NIC and never exercises the physical Ethernet stack or Windows power management. The real PLC exposes the Windows 7 NIC to driver-level power-saving, TCP auto-tuning, and keep-alive timers, each of which is independent of the S7 protocol logic and can interrupt the polling stream at 2–5 s intervals.
How many HMI tags can a S7-300 CPU 317-2 PN/DP reliably poll at a 2 s cycle?
Siemens documents the OP connection count (16) and total connection resources (32), not a tag-count ceiling. Field experience on 6ES7317-2EK14 with TIA Portal V11 SP2 Update 5 shows reliable polling at 2 s up to ~1 800 HMI tags. Beyond ~2 000 tags the communication cycle share must be raised to 40–50 %, the "Cycle management by PLC" option toggled, and tag acquisition cycles stratified. Above 3 500 tags migration to TIA Portal V13 SP1 or later is recommended.
Does enabling "Prioritized OCM communication" help with standard S7 tag polling?
No. OCM prioritization in TIA Portal V11 only raises the priority of Open Communication over MPI/TCP partners (third-party OPC, custom S7-communication FBs, SEND/RECEIVE blocks). Standard WinCC RT S7 tag polling uses the OP-connection path and is not affected by the OCM setting.
What is system alarm 140000 and why is it absent in this fault?
System alarm 140000 ("Connection to PLC interrupted / established") is emitted by the WinCC RT runtime when the underlying S7 connection transitions to disconnected state. In the documented fault the connection remains up at the protocol level; only individual tag polls time out or are dropped. Therefore 140000 is not raised, and the diagnostic path must look at cycle load, NIC power management, and driver revision rather than at the connection itself.
Should I migrate from TIA Portal V11 SP2 to V13 or V15 for this project?
Yes. TIA Portal V11 SP2 Update 5 has been out of support since 2017. The S7DOS and HMIRtm drivers in V11 SP2 have known issues with high-tag-count polling on S7-300 PN/DP CPUs that were addressed in V13 SP1, V14 SP1, and V15.1. A direct in-place upgrade with project migration is supported and typically restores full tag stability on the same hardware. Confirm WinCC RT Professional licensing covers the target V13+ version before migration.