Problem Overview
A field-engineering scenario frequently encountered in brownfield automation is the back-to-back coupling of two SIMATIC S7-300 stations through PROFIBUS DP using one CP 342-5 communications processor per station, with each CPU 314 acting as either the DP master (Class 1) or a DP slave. After project engineering in STEP 7 (classic) or TIA Portal and the subsequent download of the hardware configuration and user program, the BUSF (bus fault) LED on the CP 342-5 illuminates solid red, indicating that the module cannot establish a clean DP cycle with its peer. This article consolidates the diagnostic, programming, and commissioning procedure required to resolve this class of fault and to harden the resulting DP link against repeat occurrences.
The symptom (red BUSF LED) is a top-level indicator. The underlying causes range from missing DP_SEND/DP_RECV calls in OB1, mismatched PROFIBUS addresses, baud-rate disagreements, terminated bus segments, peer stations being powered down during bus scan, and slot/IO-mapping inconsistencies in the DP slave description (GSD-derived or configured locally). Each cause leaves a different fingerprint in the CP diagnostic buffer; engineers must read the buffer rather than guess from the LED color alone.
Hardware Components and Ordering Data
Use only released components from the SIMATIC S7-300 catalog to ensure the documented diagnostics behavior matches the firmware in your project. The CP 342-5 variants support DP-V0 and DP-V1 services at bus speeds of 9.6 kbit/s to 12 Mbit/s and provide the special diagnostic interface required for the diagnostic buffer readout steps later in this article.
| Component | MLFB / Order Number | Function |
|---|---|---|
| CPU 314 (work memory 32 KB, integrated MPI/DP) | 6ES7 314-1AF10-0AB0 (or current 6ES7314-… release) | Station controller, hosts user program and OB1 cycle for FC1/FC2 calls |
| CP 342-5 (electrical, DP master/slave) | 6GK7 342-5DA02-0XE0 / 6GK7 342-5DA03-0XE0 / 6GK7 342-5DA12-0XE0 | PROFIBUS DP master or slave interface; 9.6 kbit/s to 12 Mbit/s; up to 32 DP slaves; up to 244 bytes I/O per slave on DP-V0 |
| CP 342-5 FO (fiber-optic) | 6GK7 342-5DF00-0XE0 | Same DP services over POF/PCF plastic optical fiber for galvanic isolation and longer runs |
| PROFIBUS cable (violet, twisted, shielded) | 6XV1 830-0EH10 (or successor 6XV1830-0LH10) | Segment cable; characteristic impedance 135 Ω to 165 Ω at 3 MHz to 20 MHz |
| PROFIBUS connector with PG socket and terminating resistor | 6ES7 972-0BA12-0XA0 (axial, 35°), 6ES7 972-0BA52-0XA0 (90°) | Bus termination, switchable at each end of the segment |
| RS-485 repeater (if required) | 6ES7 972-0AA02-0XA0 | Segment expansion, isolation, baud rates up to 12 Mbit/s |
PROFIBUS DP Fundamentals for S7-300-to-S7-300 Coupling
PROFIBUS DP is a token-passing master-slave protocol standardized in IEC 61158 / IEC 61784. In a two-station S7-300 link, one CP 342-5 operates as a DP master class 1 (DPM1) and is the active bus owner. The second CP 342-5 operates as a DP slave, exchanging I/O data on a cyclic basis with the master's poll. Siemens documents the engineering model and the master/slave roles in the official SIMATIC documentation set; refer to the TIA Portal v20 reference on DP master system basics for S7-300/400/1500 for the canonical definitions of master system, slave, DP master class 1, and distributed I/O.
Key parameters that the engineering tool stores per master system:
- Highest PROFIBUS address (HSA): typically 126, the maximum address the master will probe during startup.
- Bus profile: DP, standard, or universal. For two-CP back-to-back coupling, DP is the correct selection.
- Baud rate: both stations must match. 1.5 Mbit/s is the safe default for the CP 342-5 unless segment length forces a lower value (per the IEC 61158 segment table: e.g. ≤ 200 m at 1.5 Mbit/s, ≤ 1,000 m at 187.5 kbit/s).
- DP address: 1 to 125, unique per node. The master is usually 1 or 2; the slave must differ.
CP 342-5 Operating Modes
The CP 342-5 supports three operating modes, all selected from the CP's Properties in HW Config (STEP 7) or from the device configuration in TIA Portal:
- DP master – The CP owns a DP master system. Up to 32 slaves can be attached, and the master polls each slave cyclically at the configured cycle time.
- DP slave – The CP exposes its I/O image to a foreign master. The maximum I/O length per DP slave is 244 bytes input + 244 bytes output (DP-V0 contract; the actual usable length depends on the slave's GSD revision and the master's configuration).
- PG/OP routing & S7 communication – The CP can be a passive S7 route without being a master. In DP mode the CP cannot simultaneously provide PG routing; the project must define one mode at a time.
For a station-to-station link, the master station's CP 342-5 must be configured as DP master and the peer's CP 342-5 as DP slave. The reverse assignment is invalid for cyclic DP-V0 I/O exchange.
Configuring the DP Master Station
Insert the CP 342-5 in the master station's HW Config at the slot next to the CPU. In STEP 7 (classic) the canonical sequence is:
- Open HW Config, drag the CP 342-5 into the rack, and set its PROFIBUS address (e.g. 2) and the master's PROFIBUS subnet.
- Set the CP operating mode to DP master; this converts the CP's DP interface into a master system.
- Right-click the CP, choose Insert DP Master System, and define the bus profile and baud rate (e.g. 1.5 Mbit/s, profile = DP).
- Drag the slave station's PROFIBUS node from the catalog onto the master system. If the peer is a third-party device, import its GSD file first via Options > Install GSD File and restart HW Config.
- Open the inserted slave object and align the I/O configuration (slot 0, slot 1, …) so that the master's view of inputs/outputs matches the slave's projected I/O image in the CP 342-5 DP-Slave configuration of the peer station.
- Compile and download HW Config to the master CPU.
Configuring the DP Slave Station
For the peer station, the CP 342-5 must be configured as a DP slave and the I/O mapping exported to the master via the DP-Slave Properties > Configuration dialog. Critical settings:
- DP slave address: must be unique on the segment, must not collide with the master address, must be ≤ HSA.
- Vendor / GSD identifier: leave at the Siemens CP 342-5 default; do not select a third-party GSD unless the peer is non-Siemens.
- Diagnostic interrupts: enable so that the CP can report a slave-not-found or configuration-mismatch event back to the master.
- Sync / Freeze: disable unless the application requires coordinated output freezes.
Compile the slave station's HW Config and download the configuration to the peer CPU. The slave CP will not enter DATA-EXCHANGE until the master begins polling, and the master will not begin polling until its own bus scan completes and the slave is reachable on the wire.
Programming the DP_SEND and DP_RECV Function Blocks
The CP 342-5 does not automatically exchange its I/O with the S7-300 process image. The user program on each station must call the Siemens-supplied FC1 DP_SEND and FC2 DP_RECV blocks every cycle so that the CP's buffer is copied into the S7-300 I/O area (or to/from a data block when using the any-pointer variant). Skipping this call is the single most common cause of a healthy-looking bus that nevertheless shows the slave as not in data exchange.
The blocks are installed from the STEP 7 standard library at SIMATIC_NET_CP > CP 300 > Blocks. Place FC1 and FC2 into the master station's block container, and place another pair into the slave station's block container. The signature of FC1 DP_SEND is:
// FC1 DP_SEND (input side, written by the user program)
// Inputs:
// CPLADDR : WORD // base address of the CP 342-5 (e.g. W#16#100)
// SEND : ANY // source area (DB, MW, …) with data to send
// DONE : BOOL // one-shot on successful handshake with CP
// ERROR : BOOL // 1 = error this cycle
// STATUS : WORD // status word from the CP, see error table below
FC2 DP_RECV has the same CPLADDR and a RECV ANY pointer; it transfers data received from the peer CP into the specified DB/M area and reports DONE / ERROR / STATUS identically.
A minimal OB1 call pattern on the master side:
// Master station OB1 (call every cycle)
CALL "DP_SEND"
CPLADDR := W#16#0100 // CP 342-5 base address
SEND := P#DB10.DBX0.0 BYTE 32 // 32 bytes out to slave
DONE := M10.0
ERROR := M10.1
STATUS := MW12
CALL "DP_RECV"
CPLADDR := W#16#0100
RECV := P#DB11.DBX0.0 BYTE 32 // 32 bytes in from slave
DONE := M11.0
ERROR := M11.1
STATUS := MW14
On the slave station, OB1 must call FC1 and FC2 with the same CPLADDR but with the mirror direction: what the master sends to the slave is what the slave receives via FC2, and vice versa. The DP-V0 contract of the CP 342-5 guarantees consistent handshake as long as both stations cycle OB1 faster than the configured DP cycle (default 10 ms).
BUSF LED States and Their Meaning
The BUSF (bus fault) LED on the front of the CP 342-5 is the most direct top-level indicator. State interpretation is documented in the CP 342-5 manual and is summarized in the table below for fast field reference.
| BUSF state | SF | Meaning | Likely root cause |
|---|---|---|---|
| Off | Off | DP link healthy, CP in data exchange | — |
| Solid red | Off | DP slave not reachable / bus wiring fault | Slave powered down, cable break, missing termination, baud-rate mismatch, slave address out of range |
| Solid red | Red | Configuration error on the master or on the slave | I/O length mismatch, GSD version mismatch, missing FC1/FC2 call, wrong slot in HW Config |
| Flashing red | Off | Slave diagnostic message received (DP-V1) | Peer slave reports an internal diagnostic; read its buffer for the cause |
| Flashing red | Red | Parameter assignment error | PROFIBUS address conflict, invalid baud rate, sync/freeze set without support |
| Off | Red | CP firmware / HW defect or project download not yet started | Re-run HW download, verify CP is seated, check firmware |
Reading the CP 342-5 Diagnostic Buffer
The diagnostic buffer is the most reliable tool for moving from red LED to definitive cause. In STEP 7 (classic), open the project, right-click the CP 342-5 in the station, and choose PLC > Diagnostic/Setting > Diagnostic Buffer. In TIA Portal, use Online & Diagnostics > Diagnostic buffer on the CP. The buffer stores the last events with timestamp and event ID, and the entries correspond to the standard SIMATIC event catalogue.
For two-station DP coupling, the buffer entries that are the most common in this scenario are:
| Event ID (hex) | Text | Interpretation |
|---|---|---|
| 0x13A1 | Distributed I/O: station failure | The master lost contact with the slave; read the SF LED and the slave's buffer |
| 0x13A2 | Distributed I/O: station return | Slave came back; useful to confirm that the fix worked |
| 0x38B1 | PROFIBUS: bus fault, slave not found | Wiring or address issue; check termination, address, baud rate, and that the slave is powered on |
| 0x38B2 | PROFIBUS: configuration error | Slot/IO mapping mismatch between master and slave; verify FC1/FC2 length vs. HW Config projection |
| 0x38B3 | PROFIBUS: parameter assignment error | Master attempted to bring the slave into DP with parameters the slave cannot accept |
| 0x3945 | Distributed I/O: incorrect slave configuration | The slave's HW Config differs from what the master expected; re-check the slave's slot mapping |
| 0xE0F1 | Module diagnostic: PROFIBUS DP interface fault | CP itself is in fault; re-seat the module, verify firmware, replace if recurring |
Each event is timestamped against the CP's local time base. Read the entries in chronological order, focus on the first entry that explains the cascade, and use it as the working hypothesis for the corrective action.
Step-by-Step Commissioning Procedure
Use this procedure when commissioning a fresh S7-300 to S7-300 link, or as a regression test after a configuration change.
- Power up both stations. Verify that the CPU's SF/BATF and the CP's SF/STOP LEDs are off. The CP 342-5 must show a steady green RUN LED before the bus scan begins.
- Inspect the bus segment. Confirm that the terminating resistor is ON at both physical ends of the segment and OFF on every node in between. With only two stations, both must terminate.
- Verify address and baud rate on the CP module's rotary / DIP switches (if present) or in HW Config. The CP 342-5 stores the address in non-volatile memory after download; if the project is later changed, the CP must be reset (MRES) for the new address to take effect.
- Download HW Config to the master CPU, then to the slave CPU. Each download must end with a restart of the affected CPU (cold restart) so the new bus parameters are picked up.
- Download the user program (OB1, FC1, FC2, any DBs referenced in the ANY pointers) to both CPUs.
- Set both CPUs to RUN. Watch the CP's BUSF LED. If it stays dark, the link is up; if it lights, drop to the diagnostic buffer before changing anything.
- Run a loopback test: write a known pattern (e.g. MW100 = W#16#AAAA) in the master OB1 before the FC1 call, and read it back in the slave into a MW that is then displayed in a VAT table. Toggle the pattern bit-by-bit to verify the full 32 bytes.
- Document the as-built configuration: PROFIBUS addresses, baud rate, slot mapping, ANY pointer lengths, CP firmware version, and CPU firmware version. This is the file that prevents the next outage.
Troubleshooting Matrix
Match the observed symptom to the most common root causes in the order they are most likely to appear in the field. The matrix is built around the red-BUSF-on-CP scenario, but is reused for any DP-V0 link that fails to enter data exchange.
| Symptom | First-place check | Second-place check | Definitive test |
|---|---|---|---|
| BUSF solid red on master, slave powered off | Power supply and 24 V to peer station | Power supply unit (PS 307) status LED | Power up the peer; BUSF should clear within the master's bus scan interval |
| BUSF solid red on master, peer CPU in STOP | Run switch on peer CPU | Diagnostic buffer of peer CPU | Set peer to RUN; if it drops back to STOP, fix the user program there first |
| BUSF solid red, both CPUs RUN, no SF on master | Bus termination (ON at both ends, OFF in the middle) | PROFIBUS cable continuity with 9-pin D-sub pinout check | Loopback a single short pre-made cable; if BUSF clears, the segment wiring is the fault |
| BUSF solid red with SF red on master CP | FC1/FC2 present in OB1 on both stations | ANY pointer length matches HW Config slot length | Place a VAT on DB10/DB11 on both sides; if data never changes, the FC1/FC2 call is missing or the ANY points at a wrong DB |
| BUSF flashing red | Peer slave diagnostic buffer (if DP-V1) | Sync/Freeze setting in master's HW Config | Disable Sync/Freeze, re-download, restart |
| BUSF off, but data does not update in the application | OB1 cycle priority (OB1 must call FC1/FC2) | CP base address (CPLADDR) matches the configured slot | Read the CP diagnostic buffer for "request timeout" or "CP internal error" |
| Link works at 1.5 Mbit/s, fails at higher rate | Segment length vs. baud-rate table (IEC 61158) | Connector pin engagement, shield bonding | Lower baud rate to 500 kbit/s and re-test; if it works, the segment is the limit |
| Intermittent BUSF under load | EMC: shield grounded at both ends or per Siemens guidance | Number of nodes vs. HSA | Use an RS-485 repeater; check event IDs in the buffer for repeated 0x38B1 |
FC1/FC2 STATUS Word Error Codes
When the CP returns ERROR = 1, the STATUS word reports one of a small set of standardized error codes. The most common values for a two-station S7-300 link are:
| STATUS (hex) | Meaning | Remediation |
|---|---|---|
| 0x0000 | No error | — |
| 0x7000 | FC idle, no job active | Normal; do not evaluate DONE on the same cycle |
| 0x7001 | Job running | Normal; call FC1/FC2 again in the next cycle |
| 0x7002 | Job completed, DONE = 1 this cycle | Normal; rising edge on DONE confirms handshake |
| 0x8085 | Wrong ANY pointer (length, type, or DB not loaded) | Verify the source/destination DB is loaded (not just declared), length is in byte granularity, type is BYTE |
| 0x8090 | Module with this base address not present / wrong CPLADDR | Verify the CP slot in HW Config and the CPLADDR parameter of FC1/FC2 match exactly |
| 0x80A1 | Internal CP error | Power cycle; if persistent, update CP firmware or replace the module |
| 0x80B1 | CP in STOP or DP not active | Confirm CP mode (DP master/slave) in HW Config; restart the CPU |
| 0x80C3 | Resources exhausted on the CP | Reduce the number of active jobs; check for duplicate FC1/FC2 calls per cycle |
| 0x80D0 | DP slave address conflict | Re-assign unique PROFIBUS addresses to all nodes; respect HSA |
Verification Tests
After the BUSF LED is dark and the FC1/FC2 STATUS words return 0x7002 in a steady loop, run the following four verification steps before signing the commissioning report. Each is independent; passing all four gives high confidence that the link will survive a maintenance window.
- Functional bit pattern test: write a walking 1 from MW100 on the master and read it back at MW100 on the slave in a VAT; confirm bit-for-bit match over 16 iterations.
- Bus fault injection test: power down the peer station and confirm that the master CP raises BUSF solid red within one DP cycle (10 ms typical). Restore power and confirm that BUSF clears within the configured Reaction time (default 100 ms) and that data exchange resumes without a CPU restart.
-
Cycle time measurement: place an
OB1_RTtime read in OB1 and log the maximum OB1 runtime over 5 minutes with FC1/FC2 active. The maximum should be well below the DP cycle time; otherwise the bus scan will slow and the peer will see jitter. - Diagnostic buffer regression: clear the CP's diagnostic buffer on both stations, run the application for 30 minutes under representative load, and read the buffer. A clean session should report only the standard startup events (CPU restart, CP startup) and no 0x13Ax or 0x38Bx entries.
Field-Proven Notes and Caveats
- CP 342-5 does not auto-expose its I/O. Unlike the integrated DP interface of the CPU 314, the CP's data lives in a separate buffer and is moved to the S7 process image only by FC1/FC2. A project that omits these calls will show a "green" CPU and a red BUSF as soon as the master begins polling and finds no I/O handshake.
- Both stations must be powered up before the master's bus scan. The classic symptom of a peer that is offline at scan time is a permanent BUSF until the next CPU restart, even after the peer is powered up. The fix is to MRES the master CPU after the peer is on the wire.
- Termination is non-optional. With only two nodes, both PROFIBUS connectors must have their terminating resistor switches in the ON position. With three or more, only the two physical ends terminate. The CP 342-5 has no internal termination.
- FC1/FC2 call rate vs. DP cycle. A 1.5 Mbit/s DP cycle on the CP 342-5 is 10 ms by default. If OB1 runs faster than the cycle, FC1 will be called many times per cycle and return 0x7000 / 0x7001; that is normal. If OB1 runs slower than the DP cycle, the peer will see stale data and may drop the link; raise the OB1 priority or shorten the cycle.
- Shielding. PROFIBUS cable shield should be bonded to ground at both ends (Siemens recommendation for fixed installations). For EMC-sensitive sites, an RS-485 repeater (6ES7 972-0AA02-0XA0) provides galvanic isolation that absorbs common-mode transients that would otherwise trigger BUSF.
- Reset after address change. The CP 342-5 stores its PROFIBUS address in non-volatile memory. If you change the address in HW Config and download, the CP retains the old address until a CPU memory reset / MRES is performed. The diagnostic buffer will report 0x38B3 (parameter assignment error) until this is done.
FAQ
What does a solid red BUSF LED on a CP 342-5 mean?
It indicates that the CP cannot reach its peer on PROFIBUS DP. Common causes are a powered-down or stopped peer, a wiring or termination fault, a baud-rate mismatch, or a configuration error. Read the CP's diagnostic buffer for the first event with a 0x38Bx or 0x13Ax event ID; the first such entry is the root cause.
Do I have to program FC1 (DP_SEND) and FC2 (DP_RECV) on both stations?
Yes. The CP 342-5 does not expose its data to the S7-300 process image automatically. Each station must call FC1 and FC2 in OB1, with the same base address (CPLADDR) as the configured CP slot and with the ANY pointer length matching the I/O slot length in the master station's HW Config. A missing call produces a red BUSF with SF red and a configuration error in the diagnostic buffer.
What CPLADDR value do I use for FC1/FC2?
The CPLADDR is the start address of the CP 342-5 in the S7-300 I/O area, visible in HW Config (STEP 7) under the CP's properties or in TIA Portal under device view. The value must match exactly between HW Config and the FC1/FC2 parameter; a mismatch returns STATUS 0x8090 and the CP stays out of data exchange.
How do I find out why the slave is not reachable?
Open the master station's CP 342-5 diagnostic buffer (right-click → PLC → Diagnostic/Setting → Diagnostic Buffer in STEP 7, or Online & Diagnostics → Diagnostic buffer in TIA Portal). Read the first 0x38Bx entry; if it points to "slave not found," verify that the peer is powered, that its CPU is in RUN, that the bus is terminated only at the two ends, and that the baud rate and PROFIBUS addresses are unique. Reading the peer CP's buffer in turn gives the slave-side view of the same fault.
Why does BUSF clear only after I restart the master CPU?
The CP 342-5 only re-scans the segment and re-assigns parameters to the slave on a CPU restart (cold restart). If the peer is brought online after the master's startup, the master's CP does not automatically retry. A CPU MRES, or a STOP-to-RUN transition, is required for the master to attempt data exchange again.
Can I use the CP 342-5 simultaneously as a DP master and as an S7 route for PG access?
No. In DP mode the CP 342-5 is dedicated to the PROFIBUS DP master or slave role. PG routing into the station over PROFIBUS must be served by the CPU 314's integrated MPI/DP port, not by the CP. Configure the CPU's port as MPI for the programming device or as DP only if there is a second, separate DP segment that is not this CP's master system.