Problem Overview
When integrating a Siemens CP 343-1 Lean communications processor with the SIMATIC Softnet OPC Server using the S7 protocol on a SIMATIC S7-300 station, the S7 connection fails to establish. The OPC client receives a quality code of BAD or BAD_COMMUNICATION, the server logs an E=0x0004-class failure when negotiating the S7 transport, and the connection never transitions from Connecting to Connected. The same physical hardware and NetPro project that fail against an older CP 343-1 Lean (6GK7343-1CX00-0XE0, firmware V1.1) operate correctly when the CP is replaced with the successor type 6GK7343-1CX10-0XE0.
- OPC item quality stays
BAD; neverGOOD. - S7 connection in NetPro shows no active partner and never reaches
ESTABLISHED. - CPU diagnostic buffer records
Connection establishment failedorNo more connection resourceson the CP/CPU interface. - Replacing the CP with 6GK7343-1CX10-0XE0 resolves the issue without any NetPro change.
Affected Hardware and Firmware
| Article Number | Designation | Firmware | Behavior with S7 OPC |
|---|---|---|---|
| 6GK7343-1CX00-0XE0 | CP 343-1 Lean (early revision) | V1.x (V1.1 confirmed) | Connection often fails when CPU connection resources are exhausted or when the CP runs older firmware |
| 6GK7343-1CX10-0XE0 | CP 343-1 Lean (current revision) | V2.x and later | Connection establishes reliably against the same NetPro and OPC configuration |
Per the Siemens support entry referenced for the working configuration, the recommended commissioning procedure for the CP 343-1 Lean with S7 communication to the Softnet OPC Server is documented in the Siemens Industry Online Support under entry ID 15355168. Always verify that the article number printed on the front of the CP matches the article number configured in HW Config before chasing a software root cause.
Root Cause: CPU Connection Resource Exhaustion
The single most common cause of this failure mode is exhaustion of the CPU's S7 connection resources. An S7-300 CPU reserves a fixed number of S7 connections for PG, OP, S7 routing, and configured S7 connections (PUT/GET, USEND, S7 communication to OPC servers, etc.). When every available connection slot is already consumed by reserved or active connections, the next connection request from the CP 343-1 Lean toward the SIMATIC Softnet OPC Server is rejected by the CPU and the OPC server never receives an S7 transport handshake.
Reserved connections are set in HW Config under CPU Properties → Communication. The default reservations can silently accumulate when:
- An engineering PG leaves a permanent online connection open.
- HMI panels hold multiple reserved OP connections.
- Routing is enabled through the CP and consumes additional resources.
- Multiple S7 connections are defined in NetPro that are not actually used.
- The CP itself is configured to reserve connection resources for PG and OP that are never released.
The behavior is independent of the OPC server software version. The CPU replies with an S7 negative acknowledgement that the OPC client cannot distinguish from a generic transport failure, which is why the same NetPro configuration works after the older CP is swapped for the 6GK7343-1CX10-0XE0 revision (different firmware, different internal connection handling) and stops working again as soon as the resource pool fills up.
CPU Connection Resource Limits by S7-300 CPU
| CPU | Max S7 Connections (total) | Reservable for PG | Reservable for OP | Recommended for Softnet OPC + 1 PG + 1 OP |
|---|---|---|---|---|
| CPU 312 | 6 | 1–4 | 1–4 | Insufficient; use CPU 313 or higher |
| CPU 312C | 6 | 1–4 | 1–4 | Insufficient; use CPU 313 or higher |
| CPU 313 / 313C | 8 | 1–4 | 1–4 | Marginal; release unused reservations |
| CPU 314 / 314C | 12 | 1–4 | 1–4 | Workable with tight reservation control |
| CPU 315-2 DP / 315-2 PN/DP | 16 | 1–4 | 1–4 | Comfortable |
| CPU 317-2 DP / PN/DP | 32 | 1–6 | 1–6 | Recommended for OPC + multiple clients |
| CPU 319-3 PN/DP | 32 | 1–6 | 1–6 | Recommended for OPC + multiple clients |
6ES7315-2EH14-0AB0 vs. 6ES7315-2AH14-0AB0) in the CPU's technical data sheet under "Communication / Number of connections".Diagnostic Procedure
- Open the S7 project in STEP 7 (Classic) or TIA Portal and select the SIMATIC 300 station.
- Open HW Config / device configuration and double-click the CPU.
- Navigate to the Communication tab. Note the values under "Connection resources reserved for": PG communication, OP communication, S7 routing, and the free remaining connections.
-
Open NetPro and check the status column for every configured S7 connection. Identify connections marked
not establishedor those that no longer reflect the real plant topology. -
Open the CPU online diagnostic buffer (CPU → Operating Mode → Diagnostic Buffer). Look for event IDs in the
0x05xxrange and any "no more connection resources" entries. - Open the CP 343-1 Lean online diagnostics (CP → Online → Diagnostics). Confirm the CP itself has no fault.
-
Check the OPC server log (SIMATIC Softnet OPC Server: S7OPCSrv trace). Confirm the connection enters the
S7Connectcall and what error code is returned.
Solution: Free CPU Connection Resources
-
Reduce PG and OP reservations to the minimum needed for commissioning and operation. A typical Softnet OPC station requires only
PG = 1andOP = 0when the OPC server is the only S7 client. - Disable S7 routing on the CPU if it is not actively used (CPU Properties → Communication → uncheck Use S7 routing).
- Delete unused S7 connections from NetPro. Every configured connection reserves a slot, even if the partner is offline.
- Remove the active online connection from the engineering PG: disconnect the online view in STEP 7 / TIA Portal after each session.
- Compile and download the HW Config and the NetPro to the station. The new connection budget takes effect after a CPU stop/run or restart.
- If the budget is still exhausted on a CPU 312/313, replace the CPU with at least a CPU 314 or higher. The S7-300 line offers CPUs with up to 32 S7 connections.
- PG communication: 1 (commissioning only)
- OP communication: 0
- S7 routing: disabled
- Configured S7 connections: 1 (to Softnet OPC Server) + 1 (to PG during commissioning)
NetPro Configuration Reference
The S7 connection between the CP 343-1 Lean and the OPC station must be configured as an S7 connection (not ISO-on-TCP or ISO transport) because the SIMATIC Softnet OPC Server uses the S7 protocol over the configured partner.
| NetPro Parameter | Value for CP 343-1 Lean as Local End | Value for Softnet OPC Station as Partner |
|---|---|---|
| Type | S7 connection | S7 connection |
| Local ID | 1 (free to choose) | n/a |
| Partner IP address | IP of the OPC server PC's CP 1613/Softnet interface | IP of the CP 343-1 Lean |
| Local TSAP |
01.01 (S7 default) |
01.01 |
| Partner TSAP | 01.01 |
01.01 |
| Active connection establishment | Select Establish an active connection on the OPC side (PC station) | Passive (CP 343-1 Lean accepts) |
| One-way / Two-way | Two-way (read/write) | Two-way (read/write) |
If the Softnet OPC Server runs on a PC station that also contains a SIMATIC NET CP 1613, CP 1623, or CP 1628, the OPC server's S7 channel binds to that CP's MAC/IP and the partner TSAP in NetPro must match the CP 343-1 Lean's rack/slot (rack 0, slot 2 by default when the CP is the only CP and is inserted in slot 2 of the S7-300 rack).
SIMATIC Softnet OPC Server Configuration
Open the SIMATIC Softnet OPC Server Console and verify the following:
- The S7 channel is bound to the correct network adapter (e.g., CP 1613 / TCPIP).
- The configured S7 connection name matches the NetPro Local ID on the OPC station.
- The OPC server's S7 Max PDU Length is set to
240bytes (default for CP 343-1 Lean) and not a value larger than the CP can handle. - The S7 Connect Timeout is increased to at least
10 sduring initial commissioning. - The OPC item names follow the S7 address syntax
DBx.DBBy<type>orMx.yorIx.y— a typo will cause the item to go BAD without breaking the connection itself.
Firmware Update Path (Optional but Recommended)
Even after CPU connection resources are freed, Siemens recommends updating the CP 343-1 Lean firmware to the latest available version for the installed article number. The 6GK7343-1CX10-0XE0 ships with a newer firmware that improves S7 connection handling under load. Firmware is loaded via the Firmware Update option in STEP 7 or TIA Portal on the CP's online diagnostics page.
- Download the latest firmware package from Siemens Industry Online Support under the entry for the CP 343-1 Lean.
- Place the station in STOP.
- Right-click the CP in HW Config → Target System → Firmware Update.
- Select the new firmware file (typically a
.updfile). - Execute the update; the CP will restart automatically.
- Run the station again and verify the S7 connection to the OPC server.
6GK7343-1CX10-0XE0 back to 6GK7343-1CX00-0XE0 is not supported by Siemens. If a spare-part situation requires the older article number, the configuration must be adapted to the connection budget of that revision.
Verification Procedure
- In NetPro, the S7 connection status must show
ESTABLISHEDfor the OPC partner. - In the CPU diagnostic buffer, no further "connection establishment failed" entries should be logged.
- In the Softnet OPC Server Console, the connection state should read
Connected. - From an OPC test client (e.g., OPC Scout V10), read a known DB value. The quality should be
GOOD(numeric value0xC0) and the value should reflect the actual PLC content. - Force a write from the OPC client to a boolean tag and verify the change in the PLC using a watch table in STEP 7.
- Disconnect the OPC client's connection intentionally and confirm that the CPU logs a controlled "connection terminated by partner" event (event ID
0x0357), not a resource error.
Troubleshooting Matrix
| Observed Symptom | Likely Cause | Corrective Action |
|---|---|---|
| OPC items stay BAD, no S7 connection in NetPro | CPU connection resources exhausted | Reduce reservations, delete unused NetPro connections, upgrade CPU |
| S7 connection shows ESTABLISHED but items stay BAD | Wrong OPC item address or DB not optimized/un-optimized mismatch | Verify item syntax, ensure "Non-optimized block access" is enabled on the DB |
| Intermittent disconnects every few minutes | Watchdog on the CP or OPC client polling too fast | Increase Softnet OPC update rate to ≥500 ms, check CP keep-alive |
| Connection refused, CP diagnostic buffer shows "partner not reachable" | Wrong partner IP / TSAP in NetPro | Verify partner IP, verify rack/slot TSAP encoding 01.<slot>
|
| Works on 6GK7343-1CX10-0XE0, fails on 6GK7343-1CX00-0XE0 V1.1 | Older CP firmware + tight CPU budget | Update CP firmware, free CPU resources, or replace with current CP revision |
| CPU diagnostic buffer shows "address conflict" | Duplicate IP on the network | Scan network for duplicate IPs, reassign CP 343-1 Lean IP |
Commissioning Checklist
- CP 343-1 Lean article number is 6GK7343-1CX10-0XE0 or higher.
- CP firmware is at the latest released version for that article number.
- CPU type provides at least 12 S7 connections (CPU 314 / 315 or higher).
- PG reservation = 1, OP reservation = 0, S7 routing disabled (unless required).
- NetPro S7 connection is configured with matching Local/Partner TSAP
01.01. - Softnet OPC Server Console shows the connection as
Connected. - OPC Scout V10 reads/writes a test item with quality
GOOD. - CPU diagnostic buffer is free of new connection-related events after the OPC station has been online for ≥15 minutes.
Why does the CP 343-1 Lean fail to build an S7 connection to the SIMATIC Softnet OPC Server while the same project works when the CP is replaced?
The most common cause is CPU connection resource exhaustion. The S7-300 CPU allocates a fixed number of S7 connections for PG, OP, routing, and configured S7 connections. When every slot is reserved by other clients or unused NetPro entries, the next request from the Softnet OPC Server is rejected. Reducing the reservations under CPU Properties → Communication or replacing the CP with a current revision (6GK7343-1CX10-0XE0) with newer firmware resolves the issue.
Which CP 343-1 Lean article numbers are affected?
The behavior is most often observed on the early revision 6GK7343-1CX00-0XE0 (firmware V1.1). The successor article number 6GK7343-1CX10-0XE0 with firmware V2.x and later handles S7 connections more gracefully and is the recommended spare part. Always verify the article number on the CP's front label before troubleshooting the configuration.
How many S7 connections does my S7-300 CPU support for the Softnet OPC Server?
It depends on the CPU. A CPU 312/312C supports only 6 S7 connections and is generally too small for an OPC station. A CPU 313/313C supports 8, a CPU 314/314C supports 12, and a CPU 315-2 DP / 317-2 / 319-3 supports 16 to 32. Always check the CPU's technical data sheet for the exact number, and reserve 1 connection for PG, 0 for OP, and disable S7 routing if not used.
What TSAP must I configure in NetPro for the CP 343-1 Lean to OPC connection?
Use the S7 default TSAP 01.01 on both ends when the CP is in slot 2 of rack 0 and the Softnet OPC Server runs as a passive partner on the PC station. If the CP is in a different slot, change the second octet to the slot number, e.g., 01.04 for slot 4. The Local ID in NetPro is a free index used internally by the OPC server to bind the connection.
Can I downgrade from 6GK7343-1CX10-0XE0 back to 6GK7343-1CX00-0XE0 to use a spare part?
Siemens does not support a firmware downgrade across article numbers. If the spare-part situation forces the older article number to remain in service, the network must be redesigned to fit its connection budget: fewer HMI panels, fewer PG online sessions, and a smaller OPC client count. Where the plant cannot be reduced, upgrade the CPU to a 315-2 / 317-2 / 319-3 to gain connection headroom.