Overview
The SIMATIC S7-300 CPU 316-2DP paired with a CP 343-1 communication processor is a workhorse configuration for plant-floor SCADA and HMI systems. A common field issue involves OPC communication (Siemens TCP/IP Ethernet driver, SoftNet S7, KEPware, or WinCC) failing after an apparently random interval — anywhere from 20 minutes to two weeks — while the CP itself still responds to ICMP ping and STEP 7 programming traffic over the same Ethernet interface. Only a CPU STOP → RUN transition (or pulling the CP briefly) restores the OPC session. The root cause is almost always connection resource exhaustion on the S7-300 CPU and/or the CP 343-1, compounded by connection-type mismatch (e.g. an OPC client requesting "PC" type when only "OP" connections remain).
This article walks through the diagnostic path, the resource limits of the CPU 316-2DP and CP 343-1, and the corrective configuration changes in HW Config (SIMATIC Manager / TIA Portal) that resolve the issue in the field.
Technical Background — S7-300 Communication Resource Model
Every S7-300 CPU partitions its connection resources into three configurable pools, visible from the CPU properties dialog in HW Config → Communication tab:
| Resource Type | Default | CPU 316-2DP Maximum (typical) | Purpose |
|---|---|---|---|
| PG connections | 1 | 2 (or 4 depending on order code) | STEP 7 / TIA Portal programming |
| OP connections | 1 | 4 | HMI panels, WinCC flexible, WinCC |
| S7 Standard / Basic | 0 | 4 – 8 | PUT/GET, BSEND/BRCV, S7 communication, OPC server over TCP/IP |
Total resources for the CPU 316-2DP (order numbers 6ES7316-2AG00-0AB0 and 6ES7316-2AH14-0AB0) are 32 connection resources shared between the MPI/DP interface and any installed CPs. The default of 1 PG + 1 OP is rarely enough for a system that also runs SoftNet S7, KEPware, two OP17 panels on MPI, and Profibus DP slaves.
Refer to the SIMATIC S7-300 CPU 31xC and CPU 31x Operating Instructions (Siemens entry ID 12996906) for the exact connection budget per order number. Always confirm the MLFB before sizing.
CP 343-1 Connection Limits and Driver Selection
The CP 343-1 (and CP 343-1 Lean) maintains its own, independent S7 connection table. For the 6GK7343-1EX30-0XE0 the maximum S7 connections are:
| CP Variant | Order Number | Max S7 Connections | Max PG/OP Reserved |
|---|---|---|---|
| CP 343-1 (EX30) | 6GK7343-1EX30-0XE0 | 16 | Configurable |
| CP 343-1 (EX11/EX21) | 6GK7343-1EX11/1EX21 | 4 | 1 PG + 1 OP reserved by default |
| CP 343-1 Lean | 6GK7343-1CX00-0XE0 | 4 | 1 PG + 1 OP reserved by default |
Source: SIMATIC NET CP 343-1 Industrial Ethernet operating instructions, Siemens entry ID 9262654 and follow-on manuals for the EX30 generation.
When the CP exhausts its connection table, it stops accepting new S7 connection establishment requests but continues to forward the existing physical Ethernet traffic — which is why ICMP ping and STEP 7 (which may already hold an open connection) appear to work normally.
Symptom Profile
The classic field fingerprint for this failure mode:
- OPC server (KEPware KepServer with Siemens TCP/IP driver, or WinCC V5.x/V6.x/V7.0 over Simatic Protocol Suite) reports a dropped channel and reconnection attempts time out.
- CPU and CP remain in RUN with no SF/BF LED indication. The Ethernet LINK / RX-TX activity LEDs on the CP 343-1 still flash normally.
- ICMP ping to 10.0.0.14 succeeds throughout the failure.
- STEP 7 "Accessible Nodes" or "Online → Monitor/Modify" continues to work, because it reuses the PG connection or establishes one in the small PG pool.
- A momentary CPU STOP → RUN transition (or CP power-cycle) restores OPC. A CP "STOP → RUN" toggle via STEP 7 has the same effect.
- Diagnostic buffer of the CP 343-1 often shows entries from event ID 0x0214 (PG command causes module restart) or connection establishment failures coded as 0x03xx (transport-level reject).
- Failure cadence is irregular: 20 – 30 minutes on a heavily loaded system, days or weeks on lightly loaded systems.
Root Cause — Connection Resource Exhaustion
The CPU 316-2DP keeps a connection reference table sized to the configured resource pool. When an OPC client attempts to open an S7 connection of a type (PG, OP, or S7 Standard) for which no slot is available, the CPU rejects the request with a TSAP/COTP refusal (cause code 0x02 — resource temporarily unavailable). The OPC client then enters a reconnection loop; meanwhile other partners (STEP 7, the OP17 panels on MPI) may be holding their slots open continuously, so they never release capacity for the OPC driver.
The "20-minute" cadence often maps to the OPC driver's internal reconnect interval (KEPware default ~30 s) combined with the S7-300 default T_disconnect time of ~30 s, so several reconnect attempts succeed briefly before the table is saturated again by other clients.
Secondary contributors frequently seen in the field:
- OPC client configured to request a PC type connection when only OP slots are free (KEPware "Device Driver: Siemens TCP/IP Ethernet" → Connection Type = PC/OP/PG). KEPware documentation (per its vendor's reference guide) limits the CP 343-1 to 2 PC, 1 OP, 1 PG connection; requesting beyond that fails silently.
- Reserved "Other" / routing connections not accounted for in HW Config.
- SoftNet S7 license present but with the channel left open while an HMI panel is also holding an OP connection.
- Default HW Config pool: 1 PG + 1 OP + 0 S7 Standard. This is too small once KEPware, WinCC, and the OP17 panels all attempt to attach.
Step-by-Step Resolution
Resolve the issue by enlarging the connection resource pools on the CPU and the CP 343-1 to match the actual client population.
Step 1 — Confirm the Hardware Order Numbers
Open HW Config and inspect the part numbers of the CPU and CP. Note that a CP 343-1 EX11 behaves differently from an EX30 in terms of maximum S7 connections. Document the MLFBs before making changes.
Step 2 — Increase CPU Connection Resources
- In SIMATIC Manager → HW Config, double-click the CPU 316-2DP slot.
- Open the Communication tab.
- Set the connection resource pool to a value that supports all clients. For a system with KEPware + WinCC + 2 OP17 + STEP 7, a working configuration is:
PG connections = 2
OP connections = 2 (or higher if more panels are planned)
S7 connections = 4 - Click OK and Save and Compile (the fifth toolbar icon in HW Config — the disk with the green check).
- Download the hardware configuration to the CPU. The CPU will go to STOP during this download, which is normal.
Step 3 — Configure the CP 343-1 Connection Pool
- Double-click the CP 343-1 in HW Config.
- Open the Connection tab (or Options in newer manuals).
- Increase the number of S7 connections and, if relevant, the PG/OP reservation to match the OPC client configuration. For EX30 hardware, set the connection count to at least the number of expected concurrent OPC clients plus headroom for STEP 7.
- Save, compile, and download the configuration to the CPU. The CP will restart and re-establish all open connections.
Step 4 — Match OPC Client Connection Type to Available Pool
In KEPware KepServer, set the device driver Connection Type to match the resource pool. The Siemens TCP/IP Ethernet driver offers PC, OP, and PG type connections:
| OPC Client Role | Connection Type | Resource Pool Consumed |
|---|---|---|
| KEPware data acquisition | PC | S7 / PC pool |
| WinCC server (S7 Protocol Suite) | S7 Standard | S7 Standard pool |
| STEP 7 programming | PG | PG pool |
| HMI panel (OP/TP/MP) | OP | OP pool |
If "PC" connections are refused, switching the driver to "OP" type (when OP pool capacity exists) often restores the channel without further changes.
Step 5 — Audit MPI and Profibus Clients
MPI-attached OP17 panels consume OP connection resources on the CPU 316-2DP regardless of whether traffic is active. For the OP17, this is typically 1 OP connection per panel. Profibus DP slaves (ET200S, ET200M, etc.) do not consume S7 connection resources — they are fieldbus I/O — but if any DP node runs as a DP master, that would consume an additional resource. Verify the address assignments in the PROFIBUS DP master system match the physical wiring.
Verification
- After downloading, allow 60 seconds for the CP 343-1 to reinitialize all connections.
- Open the OPC client and verify all configured tags are reading. Log a stress test that exercises the full tag list at a 1 Hz update rate.
- Use STEP 7 → PLC → Module Information → Communication tab on the CPU 316-2DP. The connection table should list every active partner, the local TSAP, and the connection state. Confirm the OPC client appears in the table and remains present.
- Force a CPU STOP → RUN cycle and confirm the OPC client re-establishes without manual intervention (a desirable but optional success criterion).
- Monitor the diagnostic buffer of the CP 343-1 for 24 hours. Entries 0x0214 (PG restart) should be absent during normal operation. Repeated 0x03xx or 0x04xx entries indicate transport-layer aborts that warrant deeper inspection.
- For a long-duration test, set the OPC driver reconnection interval to a fixed value and verify no dropouts over a 7-day window.
Diagnostic Buffer Interpretation
CP 343-1 diagnostic entries come from the SIMATIC NET firmware and follow the OB82 / OB86 / OB100-style log format. Common event IDs:
| Event ID | Meaning | Indicates |
|---|---|---|
| 0x0214 | PG command causes module restart | Normal when user-initiated; unexpected if unsolicited |
| 0x0301 | Connection establishment failed (local resource shortage) | CPU or CP connection table full — primary cause of the 20-minute drop |
| 0x0302 | Connection abort by partner | Network glitch, client crash, or firewall reset |
| 0x0311 | Connection establishment rejected by partner | OPC client requested a connection type with no matching slot |
| 0x0A04 | Life-sign timeout (keep-alive failed) | CP not receiving keep-alive from CPU; check backplane and sync cable |
Reference the CP 343-1 manual's Diagnostics appendix (Siemens entry ID 9262654) for the full event catalog and remediation matrix.
Additional Mitigations and Field Notes
- Network isolation: The diagnostic path is simpler when the PC/OPC node is on a dedicated Ethernet segment. The original site (10.0.0.0/24 with no other devices) is a good baseline. If managed switches are introduced, disable flow control and ensure no broadcast storm protection is dropping OPC traffic.
- CP firmware: For the 6GK7343-1EX11-0XE0 and earlier EX21, Siemens has shipped multiple firmware updates that fix connection-table leaks (firmware V2.x and later). Always run the latest released firmware compatible with the CPU's Profibus master behavior. Refer to the Siemens SiePortal firmware list.
- Watchdog / OB82 / OB86: If the OPC driver is a soft runtime, the OB82 / OB86 alarms triggered by CP or Profibus faults can stall the user program. Make sure OB82 and OB86 are loaded on the CPU with at least a default empty body so the CPU does not stop on transient diagnostics.
- STEP 7 V5.5 / TIA Portal V15+ project hygiene: Stale "other" or "routing" connections defined in the offline project will reserve resources once downloaded. Clean up unused connections in the NetPro / connection table before re-downloading.
- Switching to ISO transport (RFC 1006): If TCP/IP is suspected (e.g. intermittent firewall interference), the CP 343-1 also supports ISO-on-TCP. Both use the same S7 connection table, so this rarely fixes the resource-exhaustion root cause but can be useful when debugging transport-layer issues. The original site reported identical behavior on both protocols, which strongly points to resource exhaustion rather than transport.
- SoftNet S7 license: The licensed SoftNet S7 (or newer S7-OPC) software provides 6 OPC DA sessions on a single PC station by default. Verify the license dongle is firmly seated; an expired license can also manifest as periodic drops if the OPC service retries without a valid license handshake.
- CP 343-1 Lean variant: The Lean version (6GK7343-1CX00-0XE0) is hardware-identical to the standard CP for firmware below V3.x but is resource-limited to 4 S7 connections. Sites upgrading from Lean to standard EX30 should be aware of the different connection ceiling and re-do the resource sizing.
Troubleshooting Matrix
| Observed Symptom | Likely Cause | First Action |
|---|---|---|
| OPC drops after 20 – 30 minutes, restore via STOP/RUN | CPU connection pool exhausted | Increase PG/OP/S7 pools in CPU properties |
| OPC drops after days, restore via STOP/RUN | CP connection table saturated, intermittent client | Increase CP connection count; enable S7 routing only if needed |
| OPC cannot establish from the start | Wrong connection type requested by client | Switch KEPware from PC to OP type, or vice versa |
| Can ping CP, STEP 7 works, OPC fails | PG pool occupied, S7 pool empty | Reconfigure CPU: PG=2, S7 Standard=2 or more |
| Both WinCC and KEPware fail identically | Connection resource exhaustion (server-side) | Sizing exercise per this article |
| OPC works, then errors with diagnostic 0x0301 | Local resource shortage at CP or CPU | Check CP and CPU connection table in Module Information |
| OPC works for hours, then fails with firewall message | Idle TCP session timeout at managed switch | Configure switch for long idle timeout or enable S7 keep-alive |
FAQ
Why does the OPC connection drop after roughly 20 minutes but STEP 7 still works?
The 20-minute cadence is the OPC driver's reconnect interval under retry pressure. STEP 7 is unaffected because it occupies a PG connection slot that the OPC client never has a chance to release. Sizing the CPU 316-2DP connection pool to 2 PG / 2 OP / 4 S7 Standard typically eliminates the issue.
Can I ping the CP 343-1 when OPC communication has failed?
Yes. ICMP is processed independently of the S7 connection table. Ping success, working STEP 7 access, and failed OPC are the classic fingerprint of S7 connection resource exhaustion, not a network or hardware fault.
How many S7 connections does a CP 343-1 support?
It depends on the order number. The CP 343-1 EX30 (6GK7343-1EX30-0XE0) supports up to 16 S7 connections. The earlier EX11 / EX21 (6GK7343-1EX11/1EX21-0XE0) and the CP 343-1 Lean (6GK7343-1CX00-0XE0) are limited to 4 S7 connections. Always check the MLFB and the operating instructions (Siemens entry ID 9262654) before sizing.
What is the correct KEPware connection type for an OPC driver on a CP 343-1?
Use PC type if the CPU has free S7 Standard slots, OP type if only OP slots are free. KEPware documents a per-CP 343-1 limit of 2 PC, 1 OP, and 1 PG connection; requesting a type whose pool is exhausted returns a transport-level reject and the driver enters a reconnect loop.
Do Profibus DP slaves consume S7 connection resources on the S7-300 CPU?
No. DP slaves (ET200S, ET200M, frequency inverters on Profibus) are fieldbus I/O and do not use S7 connections. Only DP master partners and S7 routing/PG-OP partners consume connection resources. The OP17 panels connected on MPI do consume OP connections (one per panel).
Will a STOP → RUN cycle permanently fix the problem?
No. A STOP → RUN clears the in-memory connection table, which is why OPC immediately reconnects, but the original condition (insufficient connection pool) reasserts within minutes to days. The durable fix is to reconfigure the CPU and CP connection pools and re-download the project.