Fix STEP 7 'Connection to Target Module' Error on S7-300 DP Slave

David Krause15 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

Fix STEP 7 'Connection to Target Module' Error on S7-300 DP Slave

Engineering scope. This document covers the failure mode reported when commissioning a Siemens S7-400 CPU 417-4 as the PROFIBUS-DP master and a Siemens S7-300 CPU 315-2 DP (or CPU 313C-2 DP) as the DP slave, following the procedures of Siemens Application Note Entry ID 6518822. The remediation is equally valid for STEP 7 V5.3 and later, and for TIA Portal V13 SP1 and later.

1. Problem Description

When commissioning a PROFIBUS-DP link between an S7-400 CPU 417-4 (master) and an S7-300 CPU 315-2 DP (slave) following Siemens Application Note 6518822 ("DP link between CPU 315-2DP (slave) and S7-400 (master) with STEP 7 V5.3"), the following sequence is reported:

  1. The hardware configuration of the slave station (CPU 315-2 DP) is created, compiled, and saved without errors.
  2. The user connects the programming device (PG) to the MPI/DP port of the S7-400 CPU.
  3. The user triggers PLC → Download to Target System → CPU 315-2 DP.
  4. STEP 7 raises the dialog: "Online: The connect to target module cannot be established".
  5. PLC → Display Accessible Nodes returns an empty LiveList, or shows only the master.

The same failure appears when adding a second slave (CPU 313C-2 DP) to the DP master system of the CPU 417-4.

2. Root Cause Analysis

The error is raised by STEP 7 when no online connection can be opened to the target CPU over the configured PG/PC interface. On a CPU 31x-2 DP that sits behind a DP master, three architectural details decide whether the download succeeds; any one of them being wrong reproduces the symptom.

2.1 Interface architecture mismatch (primary cause)

The two CPU families use physically different interface assignments, and the user must understand what is wired to what:

CPU Typical order number Port X1 Port X2 Port X3 (where present)
CPU 315-2 DP 6ES7315-2AH14-0AB0 MPI DP master or DP slave (configurable; default = master) —
CPU 313C-2 DP 6ES7313-6CF00-0AB0 MPI / DP master (combined, configurable) DP master or DP slave (configurable) —
CPU 417-4 6ES7417-4XT05-0AB0 MPI/DP combined (selectable; one or the other at a time) DP master —

The CPU 417-4 is the critical detail. Its X1 port is a combined MPI/DP interface; if the project has X1 set to DP master, the CPU has no MPI surface to connect to. In that case the PG must reach the CPU over PROFIBUS, not MPI. Configuring the PG/PC interface for MPI while the CPU 417-4 is in DP-master mode is the most common reason the LiveList comes back empty.

2.2 Target CPU not in STOP

HW Config download is a memory-erasing operation on the target CPU. The target must be in STOP. According to the official TIA Portal V20 documentation:

"A CPU must be set to STOP mode for the load operation to rule out possible damage to equipment or personal injury."

Source: Siemens TIA Portal V20 — Downloading a configuration to a device. The same STOP requirement applies to STEP 7 V5.x HW Config download.

2.3 Routing not enabled on the DP slave

When the PG is connected to the DP side of the S7-400 (or to the MPI/DP port while the master is in DP mode), the download is forwarded through the S7-400 master to the slave. STEP 7 can only forward a frame if the DP slave station has the checkbox "Test, commissioning, routing" enabled in DP slave properties → Operating Mode. With this checkbox cleared, the slave is not reachable across the router, and STEP 7 returns the same "connection cannot be established" message.

3. Prerequisites

  • STEP 7 V5.3 or later, or TIA Portal V13 SP1 or later.
  • A PROFIBUS-capable PG interface: CP 5611, CP 5613 A2, CP 5711, or USB PC Adapter (6ES7972-0CB20-0XA0). Ethernet interfaces (CP 343-1, CP 443-1) are also acceptable with routing.
  • PG/PC interface driver installed and tested in Set PG/PC Interface.
  • PROFIBUS DP cable type A, 120 Ω terminating resistors enabled at both physical ends of the segment.
  • The S7-400 master and the S7-300 slave(s) mounted, wired, and powered.
  • STEP 7 authorization on the PG.
  • The slave HW Config compiled and stored inside the same STEP 7 project as the master, or imported as a separate station.

4. Pre-Download Checklist

# Item Verification
1 Master CPU in STOP (or RUN-P) Mode selector on CPU face
2 Target slave CPU in STOP Mode selector on CPU face, STOP LED on
3 PG/PC interface set to PROFIBUS (when the S7-400 has no MPI) Set PG/PC Interface dialog
4 PG PROFIBUS address unique on the segment Set PG/PC Interface → Properties → PROFIBUS
5 Bus parameters of PG match bus parameters of master Set PG/PC Interface → Properties → Bus Parameters
6 "Test, commissioning, routing" enabled on the DP slave HW Config → DP slave → Properties → Operating Mode
7 DP address in HW Config matches rotary switch on the CPU Visual compare
8 Termination on at both ends of the segment Connector switches, resistors
9 Cable shield grounded at both ends (EMC practice) Visual inspection
10 PG is online with the master first Accessible Nodes shows the CPU 417-4

5. Step-by-Step Solution

5.1 Set the PG/PC interface to PROFIBUS

  1. Open Start → SIMATIC → STEP 7 → Set PG/PC Interface.
  2. Select the access point S7ONLINE (STEP 7) → <your CP> (PROFIBUS).
  3. Click Properties → PROFIBUS: set the PG address to an unused value (e.g., 1). Address 0 is reserved for diagnostic services on some masters and should be avoided.
  4. Click Properties → Bus Parameters: choose Universal (DP/FMS); confirm the baud rate matches the DP master (default 1.5 Mbps; the project uses the value defined in the master station's DP properties).
  5. Click OK → OK to apply.

5.2 Place the slave CPU in STOP

  1. Flip the mode selector of the CPU 315-2 DP to STOP.
  2. Confirm the STOP LED is on and the RUN LED is off.
  3. Repeat for any additional slave (CPU 313C-2 DP, etc.).
Confirm the controlled plant is in a safe state before flipping the mode selector. Outputs of a CPU 31x in STOP are configured by HW Config (default: maintain last value or substitute value); the I/O is not driven by the program while STOP is active.

5.3 Enable routing on the DP slave

  1. In SIMATIC Manager, open the S7-300 slave station and double-click Hardware.
  2. Select the DP interface row of the CPU 315-2 DP (X2).
  3. Open Object Properties → Operating Mode.
  4. Tick "Test, commissioning, routing". Tick "DP slave" if not already set.
  5. Click OK, then Station → Save and Compile.

5.4 Download the HW Config

  1. With the slave station open in HW Config, click PLC → Download to Target System → CPU 315-2 DP.
  2. In Select Target Module, the slave CPU should appear with its DP address and rack/slot.
  3. If the CPU is not listed, click Display Accessible Nodes (the third toolbar button with the networked boxes and "i" icon). The LiveList will scan the bus through the S7-400 master.
  4. Select the target CPU and click OK.
  5. Confirm the STOP / START dialog (STOP is mandatory; warm restart after load is optional but recommended for a clean state).
  6. Wait for the transfer to complete; the CPU restarts automatically if Restart after download is ticked.

6. Alternative Connection Methods

6.1 Direct connection to the slave's MPI port (X1)

When the S7-300 slave is wired standalone and not yet physically connected to the S7-400 segment, the PG can be connected directly to the MPI port (X1) of the CPU 315-2 DP. Set the PG/PC interface to MPI, set the PG address to a unique value, place the CPU in STOP, and run PLC → Download to Target System. This is the simplest path during initial commissioning and is the recommended first step for a brand-new CPU.

6.2 Ethernet download via S7 routing

If the S7-400 master is fitted with an Ethernet CP (e.g., CP 443-1, 6GK7443-1EX11-0XE0), the PG can connect over TCP/IP. STEP 7 then uses S7 routing to reach the DP slave. Configure an Ethernet PG/PC interface, enter the IP of the CP 443-1 as the gateway, and run PLC → Download to Target System; the frame is forwarded by the CPU 417-4 to the slave over PROFIBUS. The same Test, commissioning, routing checkbox on the slave is required.

6.3 Adding a second DP slave (CPU 313C-2 DP)

The CPU 313C-2 DP supports DP slave operation on its second interface in the same way as the CPU 315-2 DP. Procedure:

  1. Add a new S7-300 station to the STEP 7 project.
  2. Insert the CPU 313C-2 DP from the hardware catalog. Order numbers include 6ES7313-6CF00-0AB0 (firmware V2.6 or later) and 6ES7313-6BG00-0AB0.
  3. In module properties, configure the DP port as DP slave, set the slave PROFIBUS address, and enable Test, commissioning, routing.
  4. In the S7-400 master HW Config, drag the new CPU 313C-2 DP station to the DP master system.
  5. Save, compile, and download the master HW Config to the CPU 417-4 first; then download the slave HW Config to the CPU 313C-2 DP using the procedure of Section 5.4.
Avoid duplicate PROFIBUS addresses. Each station on the segment (master, slaves, PG) must have a unique DP address in the range 0…127. Address 0 is conventionally reserved for the PG; addresses 1…125 are valid for masters and slaves. A duplicate address lights the BF LED on the affected slaves.

7. Verification

  1. Open PLC → Display Accessible Nodes. Both the CPU 417-4 and the CPU 315-2 DP (and the CPU 313C-2 DP, if installed) should appear with their DP addresses.
  2. Open the slave HW Config and click PLC → Online → Module Information to confirm the configured slot and the actual slot match.
  3. On the master HW Config, open the online view of the DP master system. The slave should be reported as OK.
  4. Watch the slave CPU's SF / BF LEDs. A steady BF (Bus Fault) means a DP communication problem — usually a duplicate address or a baud-rate mismatch.
  5. Toggle a few I/O points and verify them in the online monitor.

8. PROFIBUS DP Bus Parameter Reference

When the PG is connected to the segment, the bus parameters it uses must match the master segment, or STEP 7 will refuse to enumerate. The default values of a typical S7-400 / S7-300 DP master at 1.5 Mbps are:

Parameter Value at 1.5 Mbps Value at 500 kbps Value at 187.5 kbps Notes
Baud rate 1500 kbps 500 kbps 187.5 kbps Same for master and PG
Slot time (Tsl) 300 bit-times 1000 bit-times 4000 bit-times Per DP standard
Min station delay (Min Tsdr) 11 bit-times 11 bit-times 11 bit-times DP standard
Max station delay (Max Tsdr) 150 bit-times 250 bit-times 1000 bit-times DP standard
Quiet time (Tqui) 0 bit-times 0 bit-times 0 bit-times
Setup time (Tset) 1 bit-time 4 bit-times 16 bit-times
Target rotation time (Ttr) 10 000 bit-times 10 000 bit-times 10 000 bit-times Project-specific
Highest station address (HSA) 126 126 126 Master setting; should equal or exceed the highest slave address
Max segment length 200 m 400 m 1000 m Type A cable only

If the PG/PC interface dialog reports "No bus parameters found", the most likely cause is that the master is not cyclic on the bus, or the PG address is the same as the master address.

9. LED Status Reference for the S7-300 DP Slave

LED State Meaning
SF (red) On Group error — diagnostic, parameter, or module error
BF (red) On steady Bus fault: no DP communication with the master
BF (red) Flashing DP master not in cyclic exchange with this slave (e.g., slave is in STOP)
RUN (green) On CPU in RUN; user program executing
RUN (green) Flashing 0.5 Hz CPU in STOP, restart pending
RUN (green) Flashing 2 Hz HALT state, or memory reset in progress
STOP (yellow) On CPU in STOP
MAINT (yellow, on newer CPUs) On Maintenance event pending

A steady BF immediately after a download is the most common secondary symptom and is almost always caused by a duplicate address, a wrong baud rate, or the routing checkbox being off.

10. Troubleshooting Matrix

Symptom Likely cause Action
"Connection to target module cannot be established" on first download PG/PC interface set to MPI while CPU 417-4 has X1 in DP mode Change Set PG/PC Interface to PROFIBUS
Empty LiveList, only the PG itself visible PG PROFIBUS address conflicts with the master address Change PG address to 1 or another free value
LiveList shows master only, not the slave Slave not on the segment, or routing not enabled Check wiring, enable Test, commissioning, routing
BF LED on slave is steady Duplicate address or wrong baud rate Check address switch, compare bus parameters
Load dialog says STOP required Slave CPU still in RUN Turn mode selector to STOP, retry
Download completes but slave remains in STOP START after download not selected Tick Restart after download or turn mode selector to RUN-P
Second slave (CPU 313C-2 DP) fails identically Same routing or duplicate-address issue Apply Section 5.3 and check the DP address
LiveList returns the slave but download aborts at 50 % Cable fault or termination missing Inspect cable; check terminating resistor state at both ends
Online accessible but online view shows -- CPU in STOP and the project has been recompiled to a different slot Re-download the slave HW Config

11. STEP 7 V5.x vs TIA Portal Equivalents

Engineers migrating a project from STEP 7 V5.x to TIA Portal will find the same physical network and the same slave CPU, but the menu paths differ. The following table maps the actions of this article to the TIA Portal V20 path.

STEP 7 V5.x action TIA Portal V20 equivalent
SIMATIC Manager → Set PG/PC Interface Project tree → Online → Accessible devices, or Options → Set PG/PC Interface
PLC → Display Accessible Nodes Online → Accessible devices
HW Config → DP slave → Properties → Operating Mode → Test, commissioning, routing Devices & networks → DP slave → Properties → Operating mode → Test, commissioning, routing
PLC → Download to Target System Project tree → right-click device → Download to device → Hardware and software
PLC → Module Information Online & diagnostics → Diagnostics

12. Field-Proven Caveats

  • The CPU 317-2 DP and CPU 319-3 PN/DP behave the same as the CPU 315-2 DP for the purposes of this procedure; the DP port is the second interface (X2 or X2/X3 depending on the variant).
  • If the DP segment is longer than 100 m, verify cable type A and termination. 1.5 Mbps supports up to 200 m, 500 kbps up to 400 m, 187.5 kbps up to 1000 m. Repeaters extend this further but each repeater segment must be re-terminated.
  • PG address 0 can collide with some master diagnostic blocks; use 1 or 2 to be safe.
  • When migrating to TIA Portal, the same physical network is reused, but the slave must be re-imported from a V5.x archive, or re-inserted from the TIA hardware catalog.
  • Online accessibility should be tested after every change. A successful master download does not imply a successful slave download.
  • Some PROFIBUS connectors (e.g., 6ES7972-0BA12-0XA0) have an additional switch for the terminating resistor. Leaving the resistor enabled on a mid-segment connector is a frequent cause of intermittent BF faults.
  • The mode selector position RUN-P allows the CPU to be placed in STOP by STEP 7 for an HW Config download. RUN does not.
  • Some older CPU 31x-2 DP variants ship in DP master mode by default. Use the hardware catalog to switch the port to DP slave mode before the first download, otherwise the slave will refuse the master's parameter assignment.

13. Safety and Operational Notes

  • Downloading HW Config overwrites the existing module parameters on the target CPU. Any process connected to the slave's I/O is affected.
  • Place the controlled plant in a safe state — outputs forced to zero or maintained in their last value, as configured — before initiating the load.
  • The CPU must be in STOP for the HW Config download. Confirm with operations before flipping the mode selector.
  • Per the Siemens TIA Portal V20 documentation: "A CPU must be set to STOP mode for the load operation to rule out possible damage to equipment or personal injury."

FAQ

Why does STEP 7 show "Connection to target module cannot be established" when the PG is wired to the CPU 417-4?

The CPU 417-4's X1 port is a combined MPI/DP interface. If the project has X1 configured as DP master, the CPU has no MPI surface. Set the PG/PC interface to PROFIBUS in Set PG/PC Interface, assign a unique PROFIBUS address to the PG, and retry. The error disappears once STEP 7 can reach the master over the DP bus.

Can HW Config be downloaded to a CPU 315-2 DP through the S7-400 master?

Yes. The CPU 315-2 DP must have Test, commissioning, routing enabled in its DP slave properties, and the master must be in STOP or RUN-P. STEP 7 then routes the download through the S7-400 master to the slave over PROFIBUS. Use Display Accessible Nodes to confirm the slave is reachable before triggering the load.

Does the CPU 313C-2 DP support the same DP slave configuration as the CPU 315-2 DP?

Yes. The CPU 313C-2 DP can act as a PROFIBUS-DP slave on its second interface. Configure the DP mode in the module properties, set the slave address, enable Test, commissioning, routing, and add the slave to the DP master system of the S7-400 as a new station. The download procedure is identical to that of the CPU 315-2 DP.

What is the simplest way to download the first HW Config to a new S7-300 DP slave?

Connect the PG directly to the MPI port (X1) of the S7-300 CPU with the PG/PC interface set to MPI, set the CPU to STOP, and run PLC → Download to Target System. This bypasses the S7-400 master and the routing configuration, and is the recommended first step for a brand-new CPU before it is integrated into the larger DP segment.

Do I need to put the slave CPU in STOP for the HW Config download?

Yes. The target CPU must be in STOP for the load operation to rule out possible damage to equipment or personal injury, as documented in the Siemens TIA Portal V20 documentation on downloading configurations. The same rule applies to STEP 7 V5.x HW Config download. Place the controlled plant in a safe state before flipping the mode selector.

Back to blog