Diagnosing S7-300 SF LED Faults via Diagnostic Buffer 16#39C4

David Krause14 min read
S7-300SiemensTroubleshooting
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: SF LED on the S7-300 CPU 315-2 DP

The SF (System Fault) LED on a Siemens SIMATIC S7-300 front panel indicates a non-fatal diagnostic event the CPU has detected in the central rack, distributed I/O, or its own firmware. On a 6ES7 315-2AG10-0AB0 (CPU 315-2 DP, firmware V2.x/V3.x), the SF LED is driven by the diagnostic buffer and the OB 80 / OB 82 / OB 85 / OB 86 / OB 87 / OB 121 / OB 122 error-handling organization blocks. The BF (Bus Fault) LED on the DP master port (X2) is a separate indicator dedicated to Profibus DP physical-layer problems.

An SF event does not stop OB 1 by itself; the CPU enters STOP only if the corresponding error OB is not loaded, the error is fatal, or a configured monitoring time (cycle, communication) is exceeded. That is why field engineers routinely see the line halt with the SF LED on, OB 1 suspended, and a diagnostic buffer full of repeating 16#39C4 (DP station failure) and 16#38C4 (DP station return) entries, often capped by a 16#3501 cycle-time overflow event calling OB 80.

Before any code or hardware change, always read the diagnostic buffer first. It contains the deterministic event list the CPU itself recorded, including time stamps, event IDs, the OB that handled the error, and the logical base address of the affected slave. Hardware catalog number 6ES7 315-2AG10-0AB0 (CPU 315-2 DP) and its manuals are listed on the Siemens Industry Online Support portal at support.industry.siemens.com.

Hardware Identification and Front-Panel LED Map

The CPU in the source case is a 6ES7 315-2AG10-0AB0. The two most diagnostic-relevant LEDs on this front panel are:

LED Color Meaning
SF Red Group fault: at least one diagnostic event is pending in the buffer. Sources include I/O module diagnostics, DP slave diagnostics, system errors, and cycle-time violations.
BF Red Bus fault on the DP master interface (X2). Lit when the master cannot reach one or more configured slaves, or when the physical layer is broken.
DC5V Green Internal 5 V supply OK.
FRCE Yellow Force job active.
RUN / STOP / MRES Green/Yellow Mode and reset state.

When SF is lit alone (BF off), the fault is not a Profibus physical-layer break; the diagnostic buffer will usually show a rack/IO/cycle/program error, not a DP station failure. When both SF and BF are lit, the Profibus DP side is suspect and the buffer will contain DP master diagnostic frames such as 16#39C4 (station failure) or 16#38C4 (station return).

Accessing the Diagnostic Buffer in STEP 7

STEP 7 (SIMATIC Manager or TIA Portal) exposes the buffer as a chronological list. To open it:

  1. Connect the PG/PC to the MPI/DP port of the CPU (default MPI address 2, 187.5 kbit/s for CPU 315-2 DP).
  2. In SIMATIC Manager: PLC → Diagnostic/Setting → Diagnostic Buffer.
  3. In TIA Portal: Online → Diagnostics → Diagnostic buffer.
  4. Sort by time (most recent on top). The newest entry is the current fault, not the root cause.
  5. Click each entry to expand its detail pane: Event ID, OB requested, priority class, logical base address, and module/slave diagnostic data.

The buffer holds 100 entries on the S7-300; the oldest entry is overwritten when full. On a 315-2 DP with a charged backup battery, the buffer survives power cycle. Always export the buffer (Save As... in SIMATIC Manager) before clearing it, otherwise you lose the trend of recurring 16#39C4 / 16#38C4 pairs that pinpoints an intermittent Profibus problem.

The diagnostic buffer is time-stamped in CPU local time only if the time-of-day clock was set (or synchronized via Set Time of Day in STEP 7). Unticked events at "00:00:00.000 01/01/1994" indicate a CPU that was never set — interpret relative ordering, not absolute time.

Event-ID Decoding Table (S7-300 / CPU 31x)

Event IDs are 16-bit hexadecimal codes the CPU pushes to the buffer. The most relevant for the source case are listed below. Reference: S7-300 CPU 31xC and CPU 31x: Operating Instructions (Siemens entry ID 12996906) and the System and Standard Functions for S7-300/400 reference manual (Siemens entry ID 1214574).

Event ID (hex) Meaning OB requested Action
16#3501 Cycle-time overflow (OB 1 exceeded the configured max cycle time) OB 80 Raise max cycle time in HW Config → CPU properties → Cycle / Clock Memory, or reduce OB 1 scan load. 150 ms default on a 315-2 DP is conservative.
16#39C4 DP slave / station failure (periferia decentrata: Ausfall stazione) OB 86 Check Profibus connector, segment terminator, slave power, and slave diagnostic buffer. Affected slave number is in the event details.
16#38C4 DP slave / station return (periferia decentrata: ritorno stazione) OB 86 Informational; pairs with a preceding 16#39C4. Frequency is the diagnostic key.
16#3921 DP diagnostics from a slave (module reports a diagnostic interrupt) OB 82 Read slave diagnostic bytes via SFC 13 (DPNRM_DG).
16#357E OB not loaded fault none CPU goes to STOP. Load the missing OB into the CPU.
16#4A1E / 16#4A2E Checksum error / firmware fault none Reload STEP 7 project (RAM → ROM) and re-evaluate.
16#2521 CPU self-test error none Replace CPU. No recovery possible.

Each 16#39C4 entry in the source buffer is "incoming" (Errore esterno, Evento entrante); each 16#38C4 is "outgoing" (Evento uscente). Counting those pairs over a 24 h window is the first diagnostic to perform — a single 39C4/38C4 pair per shift is acceptable noise on a noisy plant segment, but ten pairs per hour on the same slave number is a hard Profibus or slave-power problem.

Reading the Source Buffer: Slave 26 / Yaskawa Drive

The decoded entries in the original diagnostic buffer are reproduced below, translated from Italian, with the engineering-relevant fields exposed:

Field Value
Event ID 16#39C4 (incoming) / 16#38C4 (outgoing)
Affected slave number 26
DP master system ID 1
Logical base address of slave (input) 1011
Logical base address of DP master 8191
OB requested OB 86 (Rack failure)
Priority class 25
Time stamps 13.31.46.170 06/08/2008 → 18.38.56.005 06/08/2008 → 13.18.11.185 07/08/2008 (recurring)

OB 86 is called by the operating system whenever a DP station, a Profibus line, or a configured-but-not-yet-failed slave drops out of the master's scan. The logical base address 1011 corresponds to the I-input area assigned in HW Config to slave 26; in the STEP 7 hardware catalog this typically maps to a Yaskawa Sigma-II or Sigma-V servo drive on a Profibus option card (e.g. SI-P1). The 11 ms average OB 1 scan time vs. the 150 ms cycle limit indicates that something is delaying OB 1 by ~140 ms when the slave is misbehaving — almost certainly OB 86's body (if loaded) is reading SFC 13 DPNRM_DG on the slave to log the diagnostic telegram, plus a SFC 12 D_ACT_DP deactivation/activation if a recovery strategy is implemented.

Why the SF LED Stops the Line: OB 80 + OB 86 Interaction

On a 315-2 DP, OB 80 is invoked when the configured maximum cycle time is exceeded. The default 150 ms is set under HW Config → CPU 315-2 DP → Properties → Cycle/Clock Memory. The 150 ms event in the source buffer states: "Execution time of the last cycle (ms): 150", with OB 1 itself as the cause. Three engineering consequences flow from that:

  1. OB 80 is loaded — otherwise the CPU would have gone to STOP, not just lit SF.
  2. OB 1 is the lagging OB — the Profibus OB 86 handler in the project is consuming so much time per call that OB 1 misses its 150 ms deadline each time the drive drops and re-attaches.
  3. The probable chain is: Yaskawa drive transient → DP master sees 39C4 → OB 86 executes → user logic inside OB 86 calls heavy SFCs (DPNRM_DG, possibly BSEND/BRCV) → OB 1 is delayed → 16#3501 → OB 80 executes → SF LED lit → operator sees the line halt.

OB 86 is a high-priority class 25 OB and is allowed to interrupt OB 1. Its execution time, combined with any user logic inside it, is counted against OB 1's cycle budget. Field-proven practice is to keep OB 86 bodies to a minimum: set a flag, increment a counter, and let OB 1 poll the flag and perform the heavy recovery (SFC 12 D_ACT_DP, SFC 13 DPNRM_DG) on its next cycle.

Slave-Side Diagnostics: SFC 13 and the Yaskawa Option Card

The buffer's DPNRM_DG SFC 13 reads the diagnostic telegram of a DP slave. Pseudocode suitable for the OB 86 body in Structured Text (ST):

// SFC 13 - Read DP Slave Diagnostic (max 32 bytes)
"DPNRM_DG_DB"(REQ := TRUE,
             LADDR := 1011,        // logical base address from buffer
             RET_VAL := #iRetVal,  // return value, 0 = OK, 80A1h = timeout
             BUSY   := #bBusy,
             RECORD := P#DB100.DBX0.0 BYTE 32);
// if RET_VAL = W#16#80A1, slave is in failure - SFC does not return data

For a Yaskawa Sigma-II/III/V drive on a SI-P1 / SI-P3 Profibus option card, the diagnostic telegram contains the drive status word bits. When a 16#39C4 appears, the telegram cannot be read; the cause must be inferred from the master-side behavior. Use the Yaskawa SigmaWin+ tool (or the drive's keypad) to inspect Un001 (motor speed) and the alarm history at the moment of the dropout. Common field-proven root causes on Yaskawa DP nodes in a wet/washdown plant are:

  • Resolver cable shield break → drive drops Profibus on a resolver fault.
  • 24 V control power to the SI-P1 option card sagging on a washdown rinse (the 110 V/24 V miswire case in the source is a textbook version of this).
  • Profibus cable shield broken at a flexed conduit in a wash zone → 39C4s correlate with the wash cycle.

Profibus Cable and Physical-Layer Diagnostics

When the 16#39C4 / 16#38C4 pair recurs, the physical layer must be measured. The dedicated tools listed by Siemens are:

Tool Vendor / Model Function
BT 200 Softing (Siemens-recommended, discontinued in favor of ProfiTrace 2) Bus tester, scope, signal quality on Profibus DP/PA
ProfiTrace 2 / ProfiHub Procentec Live topology, scope, bar-graph signal quality per slave, idle voltage, segment voltage
PROFIBUS Diagnostic Repeater Siemens 6ES7 972-0AB01-0XA0 Inline repeater with per-segment diagnostic; signals segment-level errors back to the master
SITRANS FC91 / FC915 Siemens Profibus cable Reference cable for comparison; FC91 (violet, 12 Mbaud), FC915 (blue, 1.5 Mbaud)

Acceptance criteria for a healthy Profibus DP segment at 1.5 Mbaud (the default for a CPU 315-2 DP master when most slaves are Yaskawa drives):

  • Idle voltage between A and B: 1.0 V ± 0.1 V when no traffic.
  • Signal amplitude: 5.0 V ± 0.5 V (bus driver output).
  • Edge rise time (10 % to 90 %): less than 1 µs at 1.5 Mbaud; segment length is the dominant variable.
  • Terminating resistors: 220 Ω across A-B with 390 Ω pull-up to +5 V and 390 Ω pull-down to GND on both ends, only on the two physical ends of the segment.

Reference: PROFIBUS Installation Guideline from PI (PROFIBUS & PROFINET International) at profinet.com, and Siemens application note Profibus DP installation in the field (entry ID 6738400 on support.industry.siemens.com).

Cycle-Time Tuning: Lower the Pressure on OB 1

If the buffer shows 16#3501 alongside the 39C4/38C4 pairs, the OB 1 budget is the proximate cause of the visible stop. Two levers exist:

  1. Raise the max cycle time: in HW Config, increase from 150 ms to 300 ms or 500 ms. This only hides the problem; do it as a temporary measure to confirm the diagnosis.
  2. Reduce OB 1 work: move heavy diagnostics and Profibus recovery logic out of OB 86 and OB 1 into OB 35 (cyclic interrupt at 100 ms) or OB 100 (warm restart). Set a flag in OB 86; service the flag in OB 35.

Monitor the cycle time after the change with OB 1 variables (e.g. OB1_PREV_CYCLE in S7-300) or via STEP 7 online PLC → Monitor/Modify. The S7-300 also exposes SFC 64 TIME_TCK for microsecond-granularity readouts if you need to time-stamp a specific scan.

Field-Commissioning Procedure for a Recurring SF LED on CPU 315-2 DP

  1. Read and export the diagnostic buffer (STEP 7 → PLC → Diagnostic buffer → Save As).
  2. Count 16#39C4 / 16#38C4 pairs by slave number. If one slave dominates, that slave or its spur is the suspect.
  3. Open HW Config: confirm the slave's diagnostic interrupt and slot are enabled. Uncheck "DP slave diagnostics" only as a last resort and only if OB 82 / OB 86 are intentionally suppressed.
  4. Check OB 86 / OB 80 presence in the online Blocks view. If OB 86 is missing, the CPU goes to STOP on every DP drop. If OB 80 is missing, it goes to STOP on every 16#3501.
  5. Measure the segment with ProfiTrace 2: idle voltage, signal amplitude per slave, reflections at terminators, shield continuity.
  6. Inspect connectors: PG-type Profibus connectors (e.g. 6ES7 972-0BA12-0XA0) have a switchable terminating resistor; both ends only.
  7. Walk the cable path alongside the production line. In a washdown plant, a single conduit dip or a junction box flooded with detergent replicates the exact 39C4/38C4 toggle seen in the source buffer.
  8. Replace or add a Profibus Diagnostic Repeater on the segment feeding the suspect slave to electrically isolate the rest of the bus.
  9. Verify the fix: monitor the diagnostic buffer for 72 h. The SF LED should remain off, no 16#39C4 should appear, and OB 1's OB1_PREV_CYCLE should be at most 30 % of the configured maximum.

Troubleshooting Matrix

Symptom Diagnostic Buffer Pattern Most Likely Root Cause First Action
SF on, BF on, line stops Repeating 16#39C4 + 16#38C4 on same slave Profibus physical-layer break to that slave Measure segment voltage, swap connector, walk the cable
SF on, BF off, line stops 16#3501 + OB 80 entries OB 1 scan exceeds configured maximum Raise max cycle time, move work out of OB 1 / OB 86
SF on, BF on, only at washdown 16#39C4 + 16#38C4 only during the wash cycle Water ingress on connector or sensor / drive card Move connector above drip line, IP67 connectors, dry out, retest
SF on after firmware update 16#357E or 16#4A1E OB missing or checksum error after project reload Reload OBs from project; verify project version matches
SF on, CPU in STOP, BF off 16#357E with OB80/86 listed Error OB not loaded in CPU Download OB 80 / OB 82 / OB 85 / OB 86 / OB 87 / OB 121 / OB 122
SF on, intermittent, single DP slave 16#3921 with diagnostic interrupt Slave is reporting an internal diagnostic (motor overload, encoder loss) Read slave diagnostic with SFC 13, check drive keypad alarm log

Safety and Project-Handling Notes

A running plant that is repeatedly tripping on 16#3501 is masking an underlying DP fault. Raising the max cycle time from 150 ms to 500 ms "solves" the SF LED for the operator but hides the real Profibus / Yaskawa / washdown problem. Always correlate buffer entries with a physical inspection before committing to a code-only fix.
When the suspect is a 110 V sensor miswired into a 24 V DC bus, the leakage path can lift the 24 V rail and inject AC into the CPU backplane. The first time the buffer was "fixed" by drying out the field device, the second time will not be. Replace the field sensor with a correctly rated device, install a galvanic isolator, and add a fuse to the affected branch.
Do not use the MRES button to clear the diagnostic buffer. MRES performs a full reset and wipes the buffer, the runtime data, and any retentive flags. Use PLC → Diagnostic/Setting → Clear buffer in STEP 7 instead, and only after you have exported the buffer to disk.

FAQ

What does the SF LED on a Siemens S7-300 CPU 315-2 DP indicate?

SF (System Fault, red) means the CPU has at least one entry in its diagnostic buffer. The most common sources are I/O diagnostic interrupts (OB 82), Profibus station failure (OB 86, event ID 16#39C4), and cycle-time overflow (OB 80, event ID 16#3501). The SF LED is informational; whether the CPU goes to STOP depends on which error OB is loaded.

How do I read the diagnostic buffer on a 6ES7 315-2AG10-0AB0?

In SIMATIC Manager go to PLC → Diagnostic/Setting → Diagnostic Buffer. In TIA Portal go to Online → Diagnostics → Diagnostic buffer. The buffer holds 100 entries, time-stamped in CPU local time. The most recent entry is the current fault; older entries show the trend (e.g. repeating 16#39C4/16#38C4 on slave 26).

What does event ID 16#39C4 mean on an S7-300?

16#39C4 is a DP slave station failure, logged as an incoming event and handled by OB 86. The accompanying details identify the slave number (e.g. 26), the DP master system ID, the logical base address of the slave (e.g. 1011 input), and the priority class (25). Pair 16#39C4 with a 16#38C4 station-return event to find intermittent DP dropouts.

How do I stop a 16#3501 cycle-time overflow on a CPU 315-2 DP?

Either raise the max cycle time in HW Config (default 150 ms) or reduce OB 1 scan load. The most common culprit is a heavy OB 86 body that calls SFC 12 (D_ACT_DP) and SFC 13 (DPNRM_DG) on every DP drop. Move that logic to a cyclic OB 35, set a flag in OB 86, and service the flag in OB 35.

What tool measures Profibus DP signal quality on a wet plant segment?

Use a Procentec ProfiTrace 2 (or older Softing BT 200) to display idle voltage (target 1.0 V), signal amplitude (5.0 V at 1.5 Mbaud), and per-slave bar-graph signal quality. For inline protection, install a Siemens 6ES7 972-0AB01-0XA0 Profibus Diagnostic Repeater at the segment boundary to electrically isolate the rest of the bus from a single noisy slave.

Back to blog