Configuring PROFIBUS DP on Siemens S7-300 in STEP 7 Hardware

David Krause12 min read
S7-300SiemensTutorial / How-to
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

Overview

PROFIBUS DP (Decentralized Periphery) is the dominant fieldbus standard for connecting distributed I/O to Siemens SIMATIC controllers. On an S7-300 station, the PROFIBUS master is typically a CPU with an integrated DP port (for example CPU 315-2 DP, CPU 317-2 DP, or CPU 319-3 PN/DP) or an external CP 342-5 communications processor. Slaves are usually ET200M, ET200S, ET200pro, or third-party devices with a GSD device description file. This article walks through the hardware configuration of an S7-300 PROFIBUS master, the addition of Siemens distributed I/O slaves, the installation of vendor GSD files, and the bus parameters required for reliable operation.

PROFIBUS DP follows IEC 61158/61784 and is maintained by PROFIBUS & PROFINET International (PI). The physical layer is RS-485 on a shielded twisted-pair cable, supporting baud rates from 9.6 kbit/s up to 12 Mbit/s, with up to 32 nodes per segment and 126 nodes with repeaters. The DP variant is optimized for high-speed cyclic I/O exchange between a single master (DP-V0/V1) or multiple masters (DP-V1/V2) and passive slaves.

Prerequisites

Before configuring PROFIBUS, verify the following:

  • SIMATIC STEP 7 V5.5 + SP2 (or older with current HSP) installed on the engineering station. TIA Portal V15.1 or later is acceptable for newer CPU firmware, but the procedures below follow STEP 7 V5.x conventions because the S7-300 is most often engineered in that environment.
  • CPU type confirmed. The CPU must expose an integrated DP port, or you must add a CP 342-5 to the rack.
  • Slave MLFB and any required GSD file. Siemens distributed I/O ET200M, ET200S, ET200MP do not require a GSD and load directly from the STEP 7 hardware catalog.
  • PROFIBUS cable (Siemens 6XV1830-0EH10 violet, or 6XV1830-3EH10 for trailing cable).
  • PROFIBUS D-sub connectors with termination switch (6ES7972-0BA52-0XA0 with PG socket, or 6ES7972-0BB52-0XA0 without PG socket).
  • STEP 7 hardware catalog updated. If the slave is not visible, install the matching HSP (Hardware Support Package) or GSD.
Important: The S7-300 rack is the master station. Slave stations are separate PROFIBUS nodes that are addressed by the master, never the other way around. A CPU without a DP port cannot act as PROFIBUS master unless an external CP is added.

S7-300 CPU and PROFIBUS Hardware Selection

Confirm the CPU model and the PROFIBUS interface. Common MLFBs that include an integrated DP master port:

CPU MLFB DP Port Max DP Slaves
CPU 313C-2 DP 6ES7313-6CF03-0AB0 Yes (X2) 16
CPU 314C-2 DP 6ES7314-6CG03-0AB0 Yes (X2) 32
CPU 315-2 DP 6ES7315-2AH14-0AB0 Yes (X2) 32
CPU 315-2 PN/DP 6ES7315-2EH14-0AB0 Yes (X2) 32
CPU 317-2 DP 6ES7317-2AK14-0AB0 Yes (X2) 32
CPU 319-3 PN/DP 6ES7319-3BL00-0AB0 Yes (X3) 32

For an S7-300 CPU without an integrated DP port, insert a CP 342-5 (6ES7342-5DA02-0XE0) into a free slot. The CP 342-5 acts as either a DP master or slave and requires FC blocks (AG_SEND/AG_RECV) for data exchange, unlike the integrated DP port which uses standard process image addressing.

Step 1: Insert the CPU and Enable PROFIBUS

  1. Open SIMATIC Manager and open the S7 project.
  2. Double-click Hardware to launch HW Config.
  3. Open the hardware catalog and browse SIMATIC 300 > CPU-300. Select the exact CPU MLFB matching the physical module and drag it onto slot 2 of the rail.
  4. Double-click the CPU to open its properties. In the Interface tab, sub-tab PROFIBUS, click Properties to configure the DP interface.
  5. If the DP port is not yet enabled, click New to create a PROFIBUS subnet, give it a name (default PROFIBUS(1)), set the address (default 2), and confirm with OK.
  6. On the Operating Mode sub-tab, select DP-Master. The other option is DP-Slave if this CPU is to be a slave to another master.

Step 2: Create the PROFIBUS Master System

After enabling the DP port, return to HW Config. The PROFIBUS network appears as a horizontal bus bar connected to the CPU's DP port.

  1. Right-click the DP port symbol on the CPU and choose Add Master System. This creates the PROFIBUS(1) subnet if it was not already created, and adds a master system bus that slaves can be attached to.
  2. If the CPU has no integrated DP port, insert a CP 342-5 first, double-click the CP, configure its DP port address, and then right-click the CP's DP port to add the master system.
Tip: Each CPU/CP can host a single master system per DP port. To create additional DP networks (for redundant paths or for separating high-speed and low-speed I/O), add another CP or use a DP/DP coupler.

Step 3: Add Siemens Distributed I/O Slaves (ET200M, ET200S, ET200MP)

Siemens slaves are in the hardware catalog and do not need GSD installation.

  1. Browse the hardware catalog: PROFIBUS DP > ET 200M, ET 200S, or ET 200pro depending on the slave type.
  2. Select the interface module (IM) and drag it onto the PROFIBUS master system bus bar. The slave appears as a station connected to the master.
  3. Double-click the IM to open its properties. Assign a unique PROFIBUS address (1 to 125, excluding the master's address). Confirm.
  4. Click the slave station in HW Config to open its lower-level slot table. Insert signal modules (SM, DO, DI, AI, AO) into the slots exactly as the physical module arrangement.

Common interface module MLFBs:

Slave IM MLFB Max Modules
ET 200M IM 153-1 6ES7153-1AA03-0XB0 8
ET 200M IM 153-2 6ES7153-2BA02-0XB0 12 (redundant)
ET 200M IM 153-4 PN 6ES7153-4BA00-0XB0 12
ET 200S IM 151-1 Standard 6ES7151-1AA05-0AB0 63
ET 200S IM 151-1 HF 6ES7151-1BA02-0AB0 63
ET 200pro IM 154-1 DP 6ES7154-1AA01-0AB0 16

Step 4: Install Third-Party GSD Files

For non-Siemens slaves (Vacon drives, ABB drives, Phoenix Contact, Wago, etc.), the device is not in the catalog until the vendor-supplied GSD file is installed.

  1. Acquire the GSD file from the device vendor. Modern GSD files are GSDML-V*.xml (PROFINET) or *.gsd / *.gsg (PROFIBUS DP). Ensure the file revision matches the firmware of the device.
  2. In HW Config, choose Options > Install GSD File.
  3. Browse to the directory containing the GSD file and click Install. STEP 7 copies the file to the project and updates the hardware catalog.
  4. After install, the device appears in the catalog under PROFIBUS DP > Additional Field Devices. Drag it to the master system bus.
  5. Double-click the slave and assign the PROFIBUS address. Click the slave station to open its slot table and configure any user-defined parameter data (Prm data) such as manufacturer-specific diagnostics enable or fail-safe behavior.
Tip: After installing new GSD files, restart HW Config and refresh the catalog view (View > Update Catalog) if the device does not appear immediately. Some vendors supply icons (bitmap files) in the same folder; copy them with the GSD for nicer catalog display.

Step 5: Configure I/O Address Areas

Each slot in the slave station corresponds to input/output bytes in the S7-300 process image. STEP 7 auto-assigns addresses, but you can manually set them to avoid collisions with the local S7-300 I/O or to group related signals.

  1. Click on a signal module in the slave and open its Properties.
  2. Set Input and Output start addresses. Typical ET200M digital inputs use IB 0..7 mapped to I 0.0..I 7.7; output modules start at QB 0..7. Address gaps are normal; modules are byte-aligned.
  3. For analog modules, the address is also byte-aligned (e.g., PIW 256 for an analog input starting at byte 256).
  4. Diagnostic addresses: every slave automatically receives a diagnostic address (e.g., 1023). The diagnostic address is where the slave reports faults via OB 82. Do not delete it; it is required for DP diagnostics.

Step 6: PROFIBUS Bus Parameters

Click the PROFIBUS bus bar (not a node) to open the subnet properties. The Network Settings tab defines the bus profile. The default 1.5 Mbit/s profile is suitable for most applications.

Baud Rate Max Segment Length Typical Use
9.6 kbit/s 1200 m Long-distance, low-speed
187.5 kbit/s 1000 m Drive interfacing, mixed
500 kbit/s 400 m Sensor/actuator I/O
1.5 Mbit/s 200 m Default profile
3 Mbit/s 100 m High-speed I/O
6 Mbit/s 100 m Drive clusters
12 Mbit/s 100 m High-speed drives, sin/cos encoders

Watchdog times: each slave has a configurable DP watchdog (default 10 ms at 1.5 Mbit/s, scaled automatically to baud). If the master does not poll the slave within the watchdog, the slave enters safe state. Increase the watchdog when long bus cycle times exist (e.g., when many slaves on a 9.6 kbit/s segment).

Step 7: PROFIBUS Cabling and Termination

PROFIBUS DP is a linear bus. Both ends of the segment must be terminated with 220 Ω between pins 3 and 8, and 390 Ω from pin 3 to pin 5 and pin 8 to pin 5. The termination is built into Siemens connectors and is enabled with a switch on the connector.

  1. Connect Pin 3 (B-line, red) to the matching pin on each node, and Pin 8 (A-line, green) likewise. Do not cross the wires.
  2. Enable termination on the first and last physical nodes only. Disable termination on all intermediate nodes. A segment with termination enabled in the middle distorts the signal and causes intermittent SF/BF errors.
  3. If the segment exceeds 32 nodes or the max length at the selected baud, add a PROFIBUS repeater (6ES7972-0AA01-0XA0) to extend by another segment. Each repeater counts as one node on each side.
  4. Maintain a minimum spacing of 1 m between PROFIBUS nodes (TBIT budget) to avoid reflections at high baud rates.
Warning: Cable shield must be bonded at both ends to a low-impedance ground. If equipotential bonding is not possible across long runs, use a capacitive ground at one end and a direct ground at the other. Avoid routing PROFIBUS parallel to VFD motor cables; cross at 90° if unavoidable.

Step 8: Compile and Download

  1. In HW Config, choose Station > Save and Compile. STEP 7 produces system data blocks (SDB) under System Data in the project tree.
  2. Connect the PG/PC to the CPU (MPI/DP or Ethernet via PN CPU) and download hardware configuration with PLC > Download to Target. The CPU goes to STOP, then RUN once the configuration matches the plugged modules.
  3. Verify the SF and BF LEDs on the CPU. Solid BF (bus fault) indicates a configuration mismatch or cable fault. Briefly flashing BF is normal during restart.

Verification and Diagnostics

After download, validate the PROFIBUS network with the following tools:

  • Module Information (PG online): PLC > Module Information > Diagnostic Buffer. Look for station failure / return events, slave diagnostic interrupts, and DP bus errors.
  • PROFIBUS Diagnostics Repeater (6ES7972-0AB01-0XA0): shows per-node signal quality, bus topology, and segment reflection statistics. Essential for troubleshooting intermittent faults.
  • STEP 7 Online > Accessible Nodes: enumerates every PROFIBUS node responding to the master's request. Cross-check against the configured master system.
  • HW Config Online View: highlights configured versus actually installed modules. Mismatches are reported in red.

Expected healthy state on the CPU: SF LED off, BF LED off, DC5V on, RUN solid green. On ET200M IM 153: SF off, BF off, ON solid green. The RUN/STOP switch on the IM allows hot swap and can be set to RUN to keep outputs frozen during a master failure.

Common Faults and Fixes

Symptom Likely Cause Remedy
BF LED solid red on CPU No slave responding, double address, broken cable, or termination at wrong end Disconnect bus, terminate only the two end nodes, isolate each segment with repeater diagnostics
SF LED on one ET200M Module mismatch or diagnostic interrupt Open module information for that slave, read the diagnostic buffer; verify slot assignments
Slave not in catalog GSD not installed or HSP missing Use Options > Install GSD File; update HSP from Siemens support
Intermittent slave dropouts EMC interference, missing shield bonding, baud rate too high for cable length Reduce baud to 500 kbit/s; check shield continuity; verify 220 Ω termination resistance across pins 3-8 at each end
OB 85 (IO Access Error) on CPU Process image addresses referenced that are not configured Check the I address map in HW Config; remove references to non-existent bytes
DP slaves not in Run after power-up Master started before slaves, configuration not yet downloaded Wait for the configured start-up time; check CPU startup parameter Startup when expected/actual config differ

Notes on CP 342-5 Compared to Integrated DP

The CP 342-5 does not place the slave data directly in the S7-300 process image. Instead, the user calls FC AG_SEND (SFB 8 for S7-400) and AG_RECV (SFB 9) to copy data between the CP's internal buffer and a user-defined DB. This is intentional: it makes the CP usable in a multi-master system and supports FDL (Fieldbus Data Link) services beyond DP. If you only need DP with simple cyclic I/O, prefer a CPU with an integrated DP port. Use the CP 342-5 when the CPU has no DP port, when you need FDL free layer-2 communication, or when you need to act as a DP slave to another master.

Migrating to TIA Portal

For projects on S7-300 with newer CPUs (firmware V3.x with PN port), the same network can be migrated to TIA Portal V15.1 or later. The steps are equivalent: insert the CPU, enable the DP interface, add the master system, drag slaves from the device catalog, and assign GSD files via Options > Manage general station description files (GSD). TIA Portal's network view provides a graphical topology and supports PROFIBUS diagnostics via the online diagnostics view. Note: PROFINET is generally preferred for new S7-300 installations using the PN variants because it removes the bus length, node count, and termination constraints of PROFIBUS.

How do I know if my S7-300 CPU has a PROFIBUS DP port?

Check the CPU's front panel for a 9-pin D-sub socket labeled X2 (or X3 on CPU 319). CPUs with -2 DP or -2 PN/DP in the MLFB (for example 6ES7315-2AH14-0AB0) include the DP master. A CPU 312 or 314 without a -2 suffix has no DP port and requires an external CP 342-5 (6ES7342-5DA02-0XE0) to act as PROFIBUS master.

How do I add a third-party PROFIBUS slave that is not in the STEP 7 catalog?

Obtain the vendor's GSD file, then in HW Config choose Options > Install GSD File. Browse to the file and confirm. The device appears under PROFIBUS DP > Additional Field Devices; drag it to the master system and assign a free PROFIBUS address between 1 and 125.

How many PROFIBUS slaves can one S7-300 master support?

Up to 32 slaves per segment on the integrated DP port (or 16 on CPU 313C-2 DP). With repeaters you can extend the network to 126 addressable nodes total. Each slave's cyclic I/O must fit in the master's DP cycle, so practical counts depend on the per-slave byte count and the configured baud rate.

What is the difference between IM 153-1 and IM 153-2 for ET200M?

IM 153-1 (6ES7153-1AA03-0XB0) supports up to 8 modules, single DP slave. IM 153-2 (6ES7153-2BA02-0XB0) supports 12 modules and DP-V1 with slot-level diagnostics and shared-input capability, and it can also be used on redundant PROFIBUS networks when paired with two masters.

Why does the BF LED stay on even after the master is downloaded?

A permanently lit BF LED on the CPU means the DP master cannot reach a configured slave. Check that termination is enabled only on the two physical end nodes, the cable is not shorted or crossed (pin 3 to pin 3, pin 8 to pin 8), the slave address matches the HW Config address, and the slave is powered. Use a PROFIBUS diagnostics repeater to see the per-node signal level.

Back to blog