Resetting the Siemens S7-300 CPU Fault LED Without a STOP/RUN Cycle
The classic symptom on a SIMATIC S7-300 (and the related S7-400) is a CPU that keeps running - the green RUN LED is on, the yellow STOP LED is off - yet the red SF (group fault) LED is permanently lit. The user-program logic is still executing, but the CPU is reporting an internal or external fault to the diagnostic buffer. Operators and programmers regularly ask: "How do I clear this LED without turning the mode switch to STOP and back to RUN?" Turning the selector to STOP clears the LED, but it also resets all non-retentive M-bit, T/C, and DB working data - which is unacceptable for a continuous process. The answer in STEP 7 V5.x is the warm restart operation, executed from inside the online project.
1. Problem Identification: What the LED Pattern Tells You
Before initiating any reset, identify exactly which LED is on. The S7-300 CPU 31x front panel exposes the following indicators (see S7-300 CPU 31xC and CPU 31x Manual for the complete reference):
| LED | Color | Meaning |
|---|---|---|
SF |
Red | Group fault (hardware, I/O, programming, or diagnostic error) |
BF |
Red | Bus fault on PROFIBUS DP / MPI interface |
BF1 / BF2
|
Red | Bus fault on interface 1 (PROFIBUS DP / PN) or interface 2 (PROFIBUS DP / PN) |
FRCE |
Yellow | At least one variable is being forced |
RUN |
Green, flashing | CPU starting up (warm/cold/hot restart in progress) |
RUN |
Green, steady | CPU in RUN mode, user program executing |
STOP |
Yellow | CPU in STOP mode, no user program execution |
MAINT |
Yellow | Maintenance demand (S7-300/400 from certain firmware onwards) |
The user scenario described in the source thread - "green RUN, yellow STOP off, red SF on, and turning the mode switch clears it but loses non-retain DB values" - is a textbook indication of a residual hardware or diagnostic fault that has not been acknowledged. The PLC itself is still running the OB1 cycle; only the fault is latched.
SF is on but RUN is on steady, the user program is executing. You do not need to interrupt the process to clear a latched diagnostic event - you can clear it from STEP 7 V5.x over MPI/PROFIBUS/TCP without touching the mode switch.2. Root Cause: Why the Fault LED Stays Latched
The S7-300 firmware latches a fault indication whenever one of the following occurs:
-
Diagnostic interrupt from a DP/PN slave or local module (e.g. an SM 331 analog input reports wire break, overrange, or underrange). OB 82 is called, but if the error is not cleared at the source the
SFLED remains on. - Hardware fault detection mismatch on analog inputs. When Hardware Interrupt or Diagnostic Interrupt is enabled in HW Config for a channel that is physically unwired, the module reports "Hardware state unknown" or "Diagnostic interrupt - channel fault" continuously. This is by far the most common source of the reported symptom.
- Remanent / retentive load error. A retentive DB or bit memory cannot be restored from the backup battery / MMC at startup - e.g. checksum mismatch, MMC removed.
- Programming error. OB not loaded, SFC call on a non-existent block, indirect addressing on an illegal area.
-
Bus fault.
BFis on because a PROFIBUS slave is missing or has a different address.SFwill be on at the same time because the group fault aggregates bus faults in many firmware versions.
The decisive diagnostic step is always to read the diagnostic buffer. Guessing whether to do a warm restart, a cold restart, or a power cycle is wasted effort; the buffer tells you in one entry what happened.
3. Reading the Diagnostic Buffer in STEP 7 V5.x
Procedure to read and clear the diagnostic buffer on a live S7-300 CPU:
- In SIMATIC Manager, select the
S7 Programnode (or theSIMATIC 300 Stationnode) for the target station. - Choose PLC > Online & Diagnostics (or press Ctrl+Alt+O if a project is already online).
- Switch to the Online view if STEP 7 asks. The target CPU is reached over the configured PG/PC interface (MPI cable, PC Adapter USB, CP 5611, or Ethernet CP).
- In the left navigation tree, open Diagnostics > Diagnostic Buffer.
- The right pane shows the most recent diagnostic events with timestamp, OB context, and the 16-bit event ID. The top entry is the most recent event. Examples you will see:
| Event ID (hex) | Meaning | Typical Cause |
|---|---|---|
0x2522 |
Diagnostic interrupt from a module | Analog input wire break / overrange / underrange |
0x39xx |
PROFIBUS DP fault | Slave failure or diagnostic event |
0x43xx |
Mode transition | STOP → RUN, warm/cold restart, etc. |
0x49xx |
User program fault | OB not loaded, programming error |
0x73xx |
Remanent memory fault | Battery exhausted or MMC removed during write |
0x3576 |
Module rack failure | IM failure or expansion rack error |
Click on an entry to see the detailed description and any associated block stack (B stack), interrupt stack (I stack), or diagnostic data of the offending module. The right pane has an Open Block button that jumps to the OB/STL source of the failing block in the offline project.
4. Most Common Culprit: Ungrounded Analog Inputs
For the S7-300 family, the most common reason the SF LED stays on with RUN still executing is the analog-input wiring combined with the module's diagnostic-interrupt setting.
The SM 331 analog input modules (e.g. 6ES7 331-1KF02-0AB0, 6ES7 331-7NF10-0AB0, 6ES7 331-7PF01-0AB0, 6ES7 331-7PF11-0AB0) ship with channel-by-channel configuration. In HW Config, open the module properties → Inputs tab. For each channel you can set:
| Setting | Effect When Channel is Unwired |
|---|---|
| Diagnostic Interrupt: Enabled | Module raises a diagnostic interrupt on first conversion. OB 82 runs once. The SF LED on the CPU lights and stays lit until the event is acknowledged. This is the LED-locking setting.
|
| Hardware Interrupt: Enabled | Module raises a hardware interrupt when limit values are exceeded. With no signal, the input floats and exceeds a configured limit → OB 40 fires repeatedly. |
| Diagnostics Interrupt: Disabled | Module reports a value (typically 0 or 0x7FFF overrange) but does not raise OB 82. CPU SF LED does not latch. This is the correct setting for unused channels.
|
Resolution for unused analog input channels:
- Open HW Config, double-click the SM 331 module.
- Go to the Inputs tab. For every channel that is not physically wired:
- Set Measurement type to Voltage 0..10V (or any voltage type - never 4..20mA on an unwired channel).
- Set Diagnostics Interrupt to Disabled.
- Set Hardware Interrupt to Disabled.
- Save and recompile the hardware (Station > Save and Compile).
- Download the hardware configuration to the CPU (PLC > Download to Target > Hardware).
For channels that are wired but still trigger the LED, physically short-circuit unused voltage inputs to M (terminal M- of the same channel) - never leave a voltage input floating. For unused current inputs (4..20mA), jumper the channel's I+ to a defined source or place a 100-ohm resistor across I+/I- to provide a defined loop current.
5. Warm Restart vs Cold Restart vs Hot Restart
The S7-300/400 firmware supports three restart types, each with different behavior on retentive vs non-retentive memory. The terminology differs slightly between S7-300 and S7-400:
| Restart Type | OB Used | Retentive Areas | Non-Retentive Areas | User-Program Call | Process Image |
|---|---|---|---|---|---|
| Hot restart (Warmstart, S7-400 only) | OB 101 | Preserved (M, T, C, DB) | Preserved | Execution resumes at the interrupted point | Restored to last output values |
| Warm restart (Neustart/Wiederanlauf) | OB 100 | Preserved (M, T, C, DB) | Initialized to load values; not cleared for already-retentive tags | OB 100 runs once, then OB 1 from the beginning | Initialized to load values |
| Cold restart (Kaltstart) | OB 102 | Initialized to load values (retentive flag is ignored) | Initialized to load values | OB 102 runs once, then OB 1 from the beginning | Initialized to zero / load values |
The S7-300 only supports cold restart and warm restart (no true hot restart with resumption at interrupt point). The S7-400 supports all three. Whether a given CPU supports hot restart depends on the firmware version - consult the device handbook for the specific CPU order number (e.g. 6ES7 416-3XR05-0AB0 for the S7-400 CPU 416-3 with firmware V5.x).
SF LED is cleared at the same time because the CPU re-initializes the diagnostic subsystem.6. Retentive vs Non-Retentive Data Blocks
Whether a DB tag survives a warm restart is configured in the DB properties:
- Right-click the DB in SIMATIC Manager → Object Properties → General Part 2 tab.
- For each tag, set the Retain attribute. In STEP 7 V5.x, retention is set per tag on the DB, and the DB itself has a single property that determines whether the DB is non-retentive (all values lost on restart) or retentive (all tags with the retain flag are preserved).
For bit memory (M area), the same logic applies: in PLC > Properties > Retentive Memory, set the start of the retentive M area (e.g. from MB0 to MB15) - everything from that address up to the retentive limit survives a power-off / warm restart. Timers and counters have similar settings in the same dialog.
On a warm restart, the firmware reads the Retentive tag attributes from the loaded DBs and preserves the current values of those tags. Non-retentive tags are reset to the initial value defined in the DB declaration (or to zero if no initial value is given). On a cold restart, all tags - retentive or not - are reset to their initial values.
7. Performing a Warm Restart in STEP 7 V5.x Without Touching the Mode Switch
This is the central procedure the source thread is asking about. The mode switch on the CPU front panel is not required; the operation is performed over the online connection.
- In SIMATIC Manager, select the
SIMATIC 300 Station(orSIMATIC 400 Station) and choose PLC > Online & Diagnostics. - In the left tree, open Operating Mode.
- The right pane shows the current mode (RUN, STOP, HOLD, STARTUP), the last restart type, the diagnostic buffer entries for the last mode transition, and a row of buttons: STOP, STARTUP (warm restart), COLD RESTART, Hot Restart (S7-400 only), and MRES.
- Click "Warm Restart" (German: Neustart / Wiederanlauf; English STEP 7 V5.x: Start (Warm Restart)).
- STEP 7 prompts for confirmation. Click OK. The CPU leaves RUN, the RUN LED flashes during the start-up phase, OB 100 is executed if loaded, then OB 1 resumes from the beginning.
- When the RUN LED returns to steady green, the warm restart is complete. The
SFLED will be off provided the underlying fault has been resolved (e.g. the analog input wiring is fixed, or the diagnostic interrupt is disabled for unused channels).
The process is identical on S7-400 with the addition of a Hot Restart button. The online dialog also lets you trigger a Cold Restart from the CPU front-panel MRES sequence, but on STEP 7 V5.x you can do it with one click.
7.1 The Front-Panel MRES Sequence (Manual Reference)
When a field engineer is on-site without a programming device, the equivalent is the front-panel MRES sequence:
- Turn the mode switch to STOP (hold for ~1 second until the yellow STOP LED is steady).
- Turn the switch back to RUN. The CPU performs the restart type configured in HW Config (default: warm restart).
- To force a cold restart manually: turn the switch to STOP, then to MRES, hold until the STOP LED flashes twice, release and turn back to MRES within 1 second, hold until STOP LED stops flashing, then turn to RUN. See the device handbook for the exact timing per CPU family.
This is what the user is calling "switching the mode switch from STOP to RUN" - the side effect is that all non-retentive variables are reset. The STEP 7 V5.x online dialog achieves the same restart without the user-program process image being interrupted by a STOP transition (the mode switch position is preserved in the PG/PC view).
8. PLCsim "Hardware State Unknown" / "Hardware State Is Unknown" Issue
When running STEP 7 V5.x with S7-PLCSIM (the simulated S7 CPU that runs in the same PC), users regularly encounter a yellow question-mark icon in the online view with the tooltip "Hardware state is unknown". The fault cannot be cleared from the PG because the PG cannot determine whether the simulated CPU's rack is healthy.
Common causes and resolutions:
- PLCSIM instance not started before the online connection is opened. Open S7-PLCSIM, choose RUN or STOP-PowerOn in the PLCSIM control panel, then return to SIMATIC Manager and re-establish the online connection.
- PLCSIM and the online project use different slot configurations. Open PLCSIM, choose PLC > Download to Target for both the HW Config and the Blocks folder. The "Hardware state is unknown" icon disappears once the simulated rack is loaded with the matching hardware configuration.
- PLCSIM instance crashed. Restart S7-PLCSIM (close and reopen the application). The simulated CPU is fully reset to the simulated boot state.
- Wrong MPI address or virtual PG interface. In Set PG/PC Interface, choose S7ONLINE → PLCSIM (TCP/IP) or the corresponding MPI/TCP variant for the version of PLCSIM installed. A wrong selection produces the unknown-hardware icon because the PG cannot bind to the simulated backplane.
Note: S7-PLCSIM does not implement all diagnostic features of a real S7-300/400. In particular, OB 82 may not fire from floating analog inputs in PLCSIM the way it does on real hardware - so the SF LED may behave differently in the simulator. This is a known limitation of PLCSIM V5.4 SP5 and earlier; later versions improved analog simulation but never fully matched a real SM 331 module.
9. Step-by-Step: Clearing the Fault LED Without Mode-Switch Cycling
Consolidated procedure for the exact symptom in the source thread:
- Go online in STEP 7 V5.x (SIMATIC Manager → PLC > Online & Diagnostics).
- Read the diagnostic buffer (Diagnostics > Diagnostic Buffer). Identify the top entry. Confirm it is a hardware/diagnostic interrupt and not a programming error.
- If the diagnostic buffer points to a DP/PN slave: open Diagnostics > Hardware Diagnostics, double-click the slave, fix the physical wiring (replace a failed slave, reconnect a dropped bus connector, repair a shield break).
- If the diagnostic buffer points to a local SM 33x (analog): open HW Config, locate the module, set Diagnostic Interrupt = Disabled for unused channels, recompile, and download the hardware to the CPU.
- Trigger a warm restart from the Operating Mode dialog (STARTUP / Warm Restart button). The CPU exits RUN, runs OB 100, restarts OB 1.
-
Check the LEDs: RUN should be green steady, STOP off,
SFoff. The user-program cycle is now in OB 1 at the beginning; non-retentive DB tags are at their load values; retentive tags are preserved. - Verify retentive data by watching a few known retentive tags in the VAT (Variable Table) online. They should be the values they had before the warm restart.
If the SF LED comes back immediately, the underlying cause is not fixed - the diagnostic buffer will show a new entry with a fresh timestamp. Iterate: read buffer, fix, warm-restart, re-check.
10. Verification and Monitoring
After a successful reset, perform these checks:
-
LEDs: RUN = green steady, STOP = off,
SF= off,BF= off (unless a slave is intentionally missing),FRCE= off unless a force is active. - Diagnostic buffer: top entry should be the mode transition (STOP→RUN) with the 0x43xx event ID, not a fresh diagnostic interrupt.
- Process image: outputs behaving as expected, VAT values matching the process state.
- OB 100 execution: if OB 100 is loaded, place a marker (set M0.0 in the first network) and verify it was triggered on the warm restart but is reset on the next OB 1 cycle.
- Retentive tag check: define a known constant on a retentive tag, do a warm restart, confirm the tag is unchanged. Then do a power-cycle and confirm the tag is still unchanged (the retentive flag protects across power-off, the warm restart protects across the restart event).
11. Troubleshooting Matrix
| Symptom | Likely Cause | First Action |
|---|---|---|
| RUN on, SF on, STOP off, mode-switch reset clears it | Latched diagnostic interrupt | Read diagnostic buffer, fix module wiring or disable diagnostic interrupt on unused channels |
| RUN off, SF on, STOP on, no user program executing | Programming error or OB not loaded | Diagnostic buffer points to OB that stopped execution - load missing OB or correct the program error |
| RUN on, SF on, BF on | PROFIBUS/PN slave failure | Hardware Diagnostics, check slave status, fix bus |
| SF blinks briefly on every restart, then steady on | Battery exhausted, retentive load error | Replace battery / check MMC, re-acknowledge retentive load |
| PLCSIM: question-mark icon, "Hardware state is unknown" | PLCSIM instance not loaded, or wrong PG/PC interface | Open PLCSIM, run STOP→RUN, set PG/PC interface to PLCSIM |
| Warm restart loses DB values you expected to keep | Retentive attribute not set on those tags | DB properties → Retain attribute per tag, recompile, download DB |
| Cold restart needed but button is greyed out | CPU firmware does not support cold restart, or HW Config forbids it | Check CPU order number and firmware version; cold restart is a CPU feature |
12. Safety and Process Considerations
13. Reference Tables
13.1 Common S7-300 CPU Order Numbers and Restart Support
| MLFB | CPU Type | Warm Restart | Cold Restart | Hot Restart |
|---|---|---|---|---|
6ES7 312-1AE14-0AB0 |
CPU 312 | Yes | Yes (per HW Config) | No |
6ES7 314-1AG14-0AB0 |
CPU 314 | Yes | Yes | No |
6ES7 315-2AH14-0AB0 |
CPU 315-2 DP | Yes | Yes | No |
6ES7 317-2AK14-0AB0 |
CPU 317-2 DP | Yes | Yes | No |
6ES7 319-3EL00-0AB0 |
CPU 319-3 PN/DP | Yes | Yes | No |
6ES7 412-2EK06-0AB0 |
CPU 412-2 | Yes | Yes | Yes (S7-400) |
6ES7 416-3XR05-0AB0 |
CPU 416-3 | Yes | Yes | Yes (S7-400) |
6ES7 417-4XT05-0AB0 |
CPU 417-4 | Yes | Yes | Yes (S7-400) |
Always verify the order number and firmware version (read from the diagnostic buffer or from PLC > Module Information > Identification) against the latest Siemens Product Support entry. Restart support has been added in firmware updates for some CPUs - e.g. CPU 319-3 PN/DP added features in firmware V2.7 and V3.x compared to V2.5.
13.2 System Blocks Related to Restart and Diagnostics
| Block | Function | Call Behavior |
|---|---|---|
| OB 1 | Main cyclic program | Runs every scan after a successful restart |
| OB 10 | Time-of-day interrupt | Optional, runs at configured time |
| OB 40 | Hardware interrupt | Runs on configurable hardware-interrupt event (rising edge, limit value) |
| OB 82 | Diagnostic interrupt | Runs on a module's diagnostic interrupt (presence, fault, return) |
| OB 85 | Priority class error | Runs when an OB is missing or the priority is wrong |
| OB 100 | Warm restart completion | Runs once at the end of a warm restart |
| OB 101 | Hot restart completion (S7-400) | Runs once at the end of a hot restart |
| OB 102 | Cold restart completion | Runs once at the end of a cold restart |
SFC 13 DP_NRM_DG
|
Read diagnostic data of a DP slave | Called from user program |
SFC 44 REPL_VAL
|
Replace accumulator 1 with a constant for diagnosis | Called in OB 82 / OB 121 to inject a substitute value |
SFC 51 RDSYSST
|
Read system status list (SSL) | Used to query partial system lists incl. diagnostic buffer |
14. Inline Flow: Reading Buffer → Diagnose → Warm Restart
15. FAQ
Why does the SF LED stay on after I corrected the program and the CPU is still running?
The SF (group fault) LED is latched until a restart event clears the diagnostic subsystem. The fault is usually a hardware or I/O diagnostic interrupt, not a programming error. Read the CPU's diagnostic buffer in PLC > Online & Diagnostics > Diagnostic Buffer - the top entry shows the exact event ID and the module that raised it. Fix the cause, then trigger a warm restart from the Operating Mode dialog. The LED will clear once the CPU re-initializes the diagnostic subsystem at the end of OB 100.
How do I reset the fault LED on a Siemens S7-300 without losing non-retentive DB values?
Mark the specific DB tags you want to keep as retentive in the DB's Object Properties > General Part 2 tab. Tags with the Retain attribute are preserved on a warm restart; non-retentive tags are reset to their initial values. Use PLC > Online & Diagnostics > Operating Mode > Warm Restart to perform the restart without touching the mode switch. Only the retentive attribute - not the restart type - protects the tag.
What is the difference between a warm restart, cold restart, and hot restart on S7-300/400?
A warm restart (OB 100) preserves retentive M, T, C, and DB tags and restarts OB 1 from the beginning. A cold restart (OB 102) resets all tags to their initial values, ignoring the retentive flag. A hot restart (OB 101, S7-400 only) resumes user-program execution at the interrupted instruction. On S7-300, hot restart is not available; only warm and cold restart exist. Confirm with the device handbook for the specific CPU order number and firmware version.
What does "Hardware state is unknown" mean in STEP 7 V5.x online view with PLCSIM?
This is a known PLCSIM behavior when the simulated CPU's rack is not loaded with the project's hardware configuration, or when the PLCSIM instance has not been started. Open S7-PLCSIM, run the simulated CPU, then in Set PG/PC Interface choose the PLCSIM variant (e.g. S7ONLINE → PLCSIM (TCP/IP)), then PLC > Download to Target for both the HW Config and the Blocks folder. The question-mark icon clears once the simulated rack matches the project.
Will a warm restart clear an ungrounded analog input fault on the SM 331?
A warm restart clears the latched LED, but if the analog input channel still floats with Diagnostic Interrupt = Enabled the fault will be raised again on the next scan. The correct fix is to disable the diagnostic interrupt on every unwired channel in HW Config, or to short the channel's M- input to a defined 0V reference. The diagnostic buffer will report a 0x2522 event for the module and channel; correct the channel configuration, download the hardware, and warm-restart.