Resolving Profibus S7 Connection Failures Between S7-300/400 CPUs

David Krause13 min read
ProfibusSiemensTroubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Resolving Profibus S7 Connection Failures Between S7-300/400 CPUs

When an engineer attempts to build an S7 connection over PROFIBUS between two S7-300 (or S7-300/400) CPUs in SIMATIC Manager / NETPRO or in TIA Portal, the symptom is almost always the same: Insert → New Connection is grayed out, and any PUT/GET or BSEND/BRCV block returns the error "No valid connection could be established between the local and remote partners (for example, due to incomplete network or there are no more connection resources)". In HW Config the S7 Communication resources field is fixed at 0 and labeled "already configured", while S7 basic Communication can still be raised. This article documents the root cause, the required hardware swap (integrated DP port → CP 342-5 / CP 443-5), the configuration procedure, and the diagnostics to confirm success.

Transport independence caveat. Although the S7 protocol is theoretically independent of the physical medium (it can run on MPI, PROFIBUS, or Industrial Ethernet), the interface hardware determines which role the CPU can play. The integrated PROFIBUS port of an S7-300/400 CPU only supports DP master/slave and PG/OP communication; S7-connection client functionality is not exposed on that port.

1. Problem Symptoms in Detail

Three concurrent symptoms indicate the configuration described in the title:

  1. NETPRO grays out Insert → New Connection. Right-clicking the CPU's integrated DP port yields no S7 connection option; right-clicking a CP 342-5 typically does, which is the first clue that the wrong interface is selected.
  2. PUT/GET block reports connection error at first call. RET_VAL comes back with 0x80A1 (connection or path not configured) or 0x8085 / 0x80B0 (connection resource exhausted / no S7 connection resource available).
  3. HW Config > CPU > Communication tab shows S7 basic Communication = editable and S7 Communication = 0, "already configured" (read-only). This is normal firmware behavior; the integrated DP port simply has zero S7 Communication resources.

2. Root Cause Analysis

Three architectural constraints interact:

Constraint Detail
Client/Server vs. Master/Slave S7 connection handling for PUT/GET, BSEND/BRCV, USEND/URCV is a client/server exchange, not a master/slave exchange. Therefore both partners must be DP Master class 1 on PROFIBUS — neither partner can be a DP slave.
Integrated DP port role The integrated PROFIBUS port of S7-300 CPUs (e.g., CPU 315-2DP, CPU 317-2DP) and S7-400 CPUs does not support the S7-connection client function. It supports DP master class 1, DP master class 2 (S7-400 only), DP slave, and PG/OP routing only.
CP 342-5 / CP 443-5 role Only a dedicated PROFIBUS CP (CP 342-5 for S7-300, CP 443-5 Extended for S7-400) exposes the S7-connection client/server endpoint. Resources are configured in the CP's own property dialog, not in the CPU's Communication tab.

The user's observation that Ethernet S7 connections work but PROFIBUS S7 connections do not is a textbook indicator of the integrated-port limitation: the S7-300/400 integrated PN (Ethernet) port supports S7-connection client/server natively; the integrated DP port does not.

3. Prerequisites

  • STEP 7 V5.5 + SP2/HF7 (or TIA Portal V14 SP1 or later for S7-300/400 projects migrated to TIA).
  • Free backplane slot (typically slot 4) in each S7-300 station for the CP 342-5.
  • CP 342-5 module(s) — recommended catalog numbers:
    • 6GK7 342-5DA02-0XE0 — CP 342-5 (RS-485, electrical)
    • 6GK7 342-5DF00-0XE0 — CP 342-5 (fiber-optic)
    • 6AG1 342-5DA02-2XE0 — SIPLUS CP 342-5 (extended temperature)
  • For S7-400 master: 6GK7 443-5DX02-0XE0 (CP 443-5 Extended).
  • PROFIBUS cable, two PROFIBUS connectors with terminating resistors enabled at the physical ends of the segment.
  • Two unique PROFIBUS addresses (e.g., master 2, master 3) and matching baud rate (1.5 Mbps typical, 12 Mbps supported by CP 342-5).

4. Step-by-Step Configuration

4.1 Install the CP 342-5 in HW Config

  1. Open SIMATIC Manager → double-click Hardware on Station_1.
  2. From the hardware catalog, expand SIMATIC 300 → CP 300 → PROFIBUS CP.
  3. Drag the CP 342-5 (matching order number) into a free slot, normally slot 4.
  4. When prompted, create or select a PROFIBUS subnet and assign the CP's PROFIBUS address (e.g., 2).
  5. Open the CP's Properties → Operating Mode tab → set to DP Master (this is the default for CP 342-5 but verify).
  6. Open the CP's Properties → S7 Connection tab → confirm the Number of S7 connections (default typically 4; max 16 on CP 342-5 firmware V5.x).
  7. Repeat the procedure for Station_2 with a different PROFIBUS address (e.g., 3).
  8. Compile and download HW Config to both stations.

4.2 Create the S7 Connection in NETPRO

  1. In SIMATIC Manager, select the project and open NETPRO.
  2. Locate the CP 342-5 (not the CPU) of the initiating station. The integrated DP port of the CPU will not allow S7 connection insertion.
  3. Right-click the CP 342-5 → Insert New Connection.
  4. In the dialog, choose the partner CP 342-5 and set the Type to S7 Connection.
  5. Configure local and partner connection IDs, slot, and rack. Use ID 1 (default) unless a conflict exists.
  6. Click OK and confirm the connection appears in the Connections table.
  7. Compile NETPRO (menu Network → Save and Compile) and download to both stations.
If Insert New Connection is still grayed out: the right-click was performed on the CPU's integrated DP interface, not the CP 342-5. Select the CP icon, then retry. The CPU icon never allows S7 connection insertion on its integrated DP port.

4.3 Program the PUT/GET Blocks

  1. Open the initiating station's program in LAD/FBD/STL Editor.
  2. Insert FB15 (PUT) or FB14 (GET) from Standard Library → Communication Blocks into OB1.
  3. Generate the instance DB when prompted.
  4. Right-click the block → Connection… → select the S7 connection created in step 4.2.
  5. Fill in the parameters: ID = connection ID, NDR/ERROR/STATUS outputs, source/destination ADDR_1 and SD_1 (PUT) or RD_1 (GET) pointers, and LEN.
  6. Compile and download to the CPU.
  7. Switch both CPUs to RUN with the partner CPU also in RUN.

5. TIA Portal Equivalent

For projects migrated to TIA Portal V14 SP1 or later, the procedure is functionally similar but uses the Network view:

  1. Both stations must contain a PROFIBUS interface (CP 342-5, CP 443-5, or for S7-1500/ET 200MP stations, a CM 1542-5).
  2. Select the PROFIBUS interface of the initiating station → Properties → S7 connection tab → Add new connection.
  3. Pick the partner's PROFIBUS interface; the connection type defaults to S7 connection.
  4. Switch to the Configuration tab to set PUT/GET data areas, lengths, and partner ID.
  5. Compile and download to both devices. The S7-1200/1500 documentation explicitly covers this flow at Configuring a PROFIBUS S7 connection.

6. Verification

  1. NETPRO online view. Open NETPRO → View → Online. The connection arrow between the two CP 342-5 modules should turn green.
  2. Module Information on CP 342-5. Online → right-click the CP → Module Information → Connection Statistics shows active S7 connections and their state (established / being established / terminated).
  3. Block status. Monitor the PUT/GET block online: NDR rises to 1 on a successful PUT, and RET_VAL is 0 for at least one scan.
  4. FB125 (S7 communication status). Insert FB125 from Standard Library → Communication Blocks; the STATUS_N word reports connection state per ID. A value of 0x0004 indicates an active, established S7 connection.
  5. Data plausibility. Write a test pattern to the partner DB via PUT, read it back with GET, and confirm byte-for-byte equality.

7. RET_VAL Error Code Reference (PUT/GET, BSEND/BRCV)

RET_VAL (hex) Meaning Recommended Action
0000 Job completed without error None — normal operation
0001 Connection being established Wait; retry on next scan
7000 No job active (block idle) Check trigger / REQ condition
7001 Job initiated, awaiting partner Verify partner CPU is in RUN and accessible
7002 Job rejected by partner Inspect partner's PUT/GET resources; check partner is master
8085 Local connection resource exhausted Increase S7 connection resources on the local CP
80A1 Connection or path not configured Verify S7 connection exists in NETPRO and was downloaded to both stations
80A3 Connection terminated by partner Check partner CPU operating mode and PROFIBUS cable integrity
80B0 No S7 connection resource available Add a CP 342-5 / CP 443-5; raise connection resource count
80B1 Partner not reachable Check PROFIBUS address, baud rate, terminating resistors, cable
80B4 Connection already exists (duplicate ID) Remove the duplicate connection entry in NETPRO
80C1 Resources of partner exhausted Increase the partner CP's S7 connection resources

8. Resource Limits by Hardware

Interface S7 Connections PUT Max Bytes GET Max Bytes Client Role
S7-300 CPU integrated DP 0 — — No
S7-300 CPU integrated PN Up to 16 (model-dep.) 160 160 Yes
CP 342-5 Up to 16 (FW ≥V4.0) 160 160 Yes
S7-400 CPU integrated DP 0 on DP, 16+ via PN — / 462 — / 462 No (DP) / Yes (PN)
CP 443-5 Extended Up to 48 (FW ≥V6.x) 462 462 Yes

Numbers above are per call; a PUT may be issued sequentially with a larger total payload by chunking. BSEND/BRCV supports up to 65534 bytes per call on a CP 342-5, segmented automatically by the firmware.

9. Why Integrated PN Works but Integrated DP Does Not

The S7-300/400 firmware exposes the S7-connection client/server endpoint through the PROFINET interface controller silicon, but not through the integrated PROFIBUS ASIC. The PROFIBUS ASIC on the CPU only implements DP-V0/V1 master class 1, DP master class 2 (S7-400 only), DP slave, FDL, and PG/OP services. The S7-connection layer sits on top of ISO-on-TCP (RFC 1006) for Ethernet, but on top of FDL on PROFIBUS — and the FDL client state machine for S7 connections is not part of the integrated DP firmware. Moving that logic to the CP 342-5/443-5 keeps the S7 connection state machine off the CPU's deterministic DP cycle.

This is why the field S7 Communication = 0, already configured in the CPU's Communication tab is correct firmware behavior, not a misconfiguration. The integrated port has zero S7-connection resources by design.

10. Diagnostic Procedure (Field-Ready Checklist)

  1. Verify operating mode of the integrated DP port. HW Config → CPU → Properties → Operating Mode tab → set to DP Master. A station set to DP Slave cannot host an S7-connection client.
  2. Check NETPRO topology. In NETPRO, confirm both CP 342-5 modules are on the same PROFIBUS subnet graphic. The connection partner must be visible on the bus.
  3. Confirm the right-click target. Insertion must be on the CP, not the CPU. The CPU's integrated DP icon never offers S7 connection insertion.
  4. Read the connection status with FB125. Provides per-connection state for all configured S7 connections; useful for detecting half-configured setups.
  5. Check CP diagnostics buffer. Online → CP 342-5 → Module Information → Diagnostics Buffer. Codes 0x0A31 (connection resource exhausted) and 0x0E01 (wire break / partner not reachable) are the two most common.
  6. Validate PROFIBUS physical layer. Use a PROFIBUS tester or BT200 tester to confirm signal level, termination, and absence of reflections above the configured baud rate.
  7. Verify GSD-free integration. CP 342-5 is integrated as a Siemens object, not via GSD. If a GSD is loaded for the CP, the S7-connection functions are disabled — reinstall from the Siemens hardware catalog.

11. Common Pitfalls and Field Notes

  • Slaves masquerading as masters. Configuring the partner station as a DP slave in HW Config is the most common cause of Insert New Connection grayed out. The S7-connection client cannot live on a slave.
  • GSD-installed CP 342-5. A CP 342-5 installed via GSD file appears in the catalog but disables S7-connection functions. Always drag the module from SIMATIC 300 → CP 300 → PROFIBUS CP → CP 342-5.
  • Wrong PROFIBUS address in NETPRO. The address used in the CP properties must match the address set on the physical device (DIP switches on the CP). Mismatch = no S7 connection establishment.
  • Missing download of NETPRO. HW Config must be downloaded and NETPRO must be compiled and downloaded separately. Forgetting the NETPRO download leaves the CPU with no configured S7 connections.
  • Licensing. No additional license is required to configure or use S7 connections. The grayed-out menu is a hardware selection issue, not a license issue.
  • Firmware drift between stations. Mixing CP 342-5 firmware V3.x with V6.x on a segment is supported but may limit the maximum S7 connection count to the older module's limit. Pin both modules to the same firmware revision for predictable behavior.
  • PROFIBUS DP/PA coupler interference. A PA segment connected through a coupler does not carry S7-connection traffic; S7-connection client/server only works on the DP segment between the two CP modules.

12. Quick Reference: Common Configuration Mistakes

Symptom Likely Cause Fix
Insert New Connection grayed out Right-clicked CPU integrated DP port Right-click the CP 342-5 instead
S7 Communication resources = 0, read-only Using integrated DP port, not a CP Add CP 342-5 and configure S7 connection resources there
PUT returns 80A1 Connection not downloaded or not configured Save + compile + download NETPRO to both stations
PUT returns 80B1 Partner not reachable Check cable, terminators, addresses, baud rate
Ethernet S7 conn works, PROFIBUS does not Integrated PN port supports client, integrated DP does not Add CP 342-5 / CP 443-5 for PROFIBUS S7 connections
Connection drops after a few minutes Watchdog / keep-alive mismatch Align CP 342-5 watchdog settings on both stations

FAQ

Why is the "S7 Communication" resource field grayed out and shows 0?

The CPU's integrated PROFIBUS (DP) port does not implement the S7-connection client/server function in firmware; it has zero S7 Communication resources by design. Add a CP 342-5 (S7-300) or CP 443-5 (S7-400) and configure S7 connection resources in the CP's own property dialog, not the CPU's Communication tab.

Can I establish an S7 connection between two S7-300 CPUs using only their integrated PROFIBUS ports?

No. The integrated PROFIBUS port on S7-300 CPUs only supports DP master/slave and PG/OP services. S7-connection client functionality (PUT, GET, BSEND, BRCV) requires a CP 342-5. Both stations must also be configured as DP Master class 1 — neither side may be a DP slave.

Why does the same S7 connection configuration work over Industrial Ethernet but not over PROFIBUS?

The integrated PROFINET (Ethernet) port of an S7-300/400 CPU implements the S7-connection client/server endpoint natively. The integrated PROFIBUS (DP) port does not — the S7-connection state machine on PROFIBUS is only exposed on dedicated CPs (CP 342-5, CP 443-5, or CM 1542-5 for S7-1500). The transport-independent nature of the S7 protocol refers to the user program, not the hardware interface.

What is the difference between "S7 Communication" and "S7 basic Communication" in HW Config?

S7 Communication refers to the client/server protocol used by PUT, GET, USEND, URCV, BSEND, BRCV over ISO-on-TCP or FDL. S7 basic Communication refers to the connectionless / connection-oriented services exposed on the integrated MPI/PROFIBUS port (USEND/URCV only, no PUT/GET). They are separate resource pools, which is why only S7 basic Communication can be edited in the CPU's Communication tab.

Do I need an additional license to configure S7 connections in NETPRO?

No. S7 connection configuration does not require an additional license. The grayed-out Insert New Connection symptom is a hardware configuration issue (wrong interface selected or missing CP), not a licensing issue. Verify that you are right-clicking the CP 342-5, not the CPU's integrated DP port.

What RET_VAL values indicate "no more connection resources" in PUT/GET blocks?

RET_VAL = 0x8085 means the local connection resource is exhausted; 0x80B0 means no S7 connection resource is available on the partner. Both errors typically mean the CP 342-5/443-5 has reached its S7 connection limit (16 / 48 respectively) or the connection was never compiled and downloaded via NETPRO. Increase the S7 connection count in the CP's properties and re-download.

How many S7 connections can a CP 342-5 support simultaneously?

A CP 342-5 supports up to 16 S7 connections on firmware V4.0 and later. These resources are independent of the CPU's own S7 connection resources. Each S7 connection configured in NETPRO consumes one resource from the CP's pool; a PUT and a GET to the same partner share one connection if defined that way, or each can occupy its own ID.

Back to blog