Classic Siemens S7 CPUs do not have one "restart." They have three startup paths — cold restart, warm restart, hot restart — and each one runs a different startup organization block and applies a different rule to the process image, bit memory, timers, counters, and data blocks. Choosing the wrong one silently wipes retentive data, or worse, resumes a machine from the middle of an interrupted cycle. This reference maps the three types to OB102, OB100, and OB101, to the CRST/WRST selector, and to the backup battery.
Startup Type to Startup OB Map
| Startup type | Startup OB | Program entry point | Availability |
|---|---|---|---|
| Cold restart | OB102 |
Program restarts from the beginning after full initialization | Not supported by every S7-400 CPU — confirm in the technical data for your exact order number |
| Warm restart | OB100 |
Program restarts from the beginning | Default startup type if the startup configuration has never been changed |
| Hot restart | OB101 |
Program resumes at the point of interruption | S7-400 CPUs only, and only with a backup battery installed |
What Each Restart Preserves
Cold restart (OB102)
- All data is initialized: process image (PII/PIQ), bit memory (M), timers (T), and counters (C).
- Data blocks are reset to the initial values stored in load memory — independent of whether the DB or the individual variables were configured as retentive.
- Runtime values written to a DB (recipes, accumulated totals, operator setpoints, learned offsets) are gone. If those values must survive, they cannot live only in DB actual values.
-
OB102executes before cyclic program execution begins.
Warm restart (OB100)
- Process image PII and PIQ are reset.
- Non-retentive M, T, and C are reset.
- M, T, and C that are configured as retentive keep their last valid values.
- DB data behavior depends on the backup battery — see the table below.
-
OB100executes before cyclic program execution begins.
Hot restart (OB101)
- All data retains its last valid value.
- The program continues from the interruption point rather than from the start.
- Outputs do not change state until the current cycle is completed.
-
OB101executes at startup. Requires a backup battery.
Battery dependence
| Condition | Retentive M / T / C | DB actual values on warm restart | Hot restart |
|---|---|---|---|
| Backup battery present | Retained | All DB data retained | Possible (S7-400) |
| No backup battery | Not retained — no non-volatile area available per this behavior model | Not retained | Not possible |
This battery dependency is described as the single largest behavioral difference between S7-300 and S7-400 in the underlying material. Treat it as a design constraint, not as a universal hardware fact: retentive-memory implementation varies by CPU, so confirm the retentive-memory specification for your specific CPU order number before you rely on data surviving a power loss without a battery.
Triggering Each Restart Type
| Trigger | Configured startup type | CRST/WRST selector (if fitted) | Result |
|---|---|---|---|
| Manual STOP → RUN | Warm restart | Must be set to CRST
|
Manual warm restart, OB100
|
| Manual STOP → RUN with WRST | Hot restart | Must be set to WRST
|
Manual hot restart, OB101
|
| Power OFF → Power ON | Warm restart | No effect on the result | Automatic warm restart, OB100
|
| Power OFF → Power ON | Hot restart | No effect on the result | Automatic hot restart, OB101
|
Two rules follow directly from this matrix:
- The CRST/WRST selector only arbitrates manual restarts initiated by a STOP → RUN transition. It does not influence what happens when the CPU is powered up.
- The startup type configured in the CPU properties is what governs the automatic startup after power on. If you want a specific behavior after a power failure, you set it in the hardware configuration, not on the front-panel switch.
Verify the Startup Path in the Program
Do not assume which startup OB ran. Instrument all three and read the result from the HMI or from the variable table.
// OB100 - warm restart
L 1
T MB 100 // 1 = last startup was WARM
L MW 102
L 1
+I
T MW 102 // warm restart counter (M must be retentive)
// OB101 - hot restart (S7-400 only)
L 3
T MB 100 // 3 = last startup was HOT
L MW 104
L 1
+I
T MW 104
// OB102 - cold restart
L 2
T MB 100 // 2 = last startup was COLD
L MW 106
L 1
+I
T MW 106 // cold restart clears M first, so this
// counter can never read higher than 1
The cold-restart counter behaves as its own signature: because cold restart initializes M regardless of retentive configuration, MW106 reads 1 after a cold restart and the warm and hot counters read 0. That pattern is unambiguous evidence that OB102 executed.
Full verification sequence on a de-energized or safely isolated machine:
- Open the CPU properties in the hardware configuration and record the configured startup type. This is the value that drives the automatic power-on behavior.
- Confirm which startup OBs are actually downloaded to the CPU. A configured startup type with no corresponding startup OB gives you no place to run initialization logic.
- Declare
MB100andMW102–MW106in the retentive area and download the instrumentation above. - Seed test data: write a non-zero pattern into a retentive M word, a non-retentive M word, and a DB word whose initial value in load memory is 0.
- Perform one restart type at a time. After each, read
MB100, the three counters, and all three test words, and compare against the preservation rules in the table above. - If you must qualify the no-battery case, repeat step 5 with the battery removed and the CPU powered down — and treat every retentive value as lost until proven otherwise.
Conflicting Field Definitions and How to Resolve Them
A second, informal definition of these terms circulates on the plant floor and it does not agree with the memory model above. Both versions appear in the same source material, so treat the terminology as ambiguous until it is pinned down.
| Term | Configuration/memory model (used in this article) | Informal shop-floor model |
|---|---|---|
| Cold restart | Full initialization, DBs reset to load-memory initial values, OB102
|
Any power-down followed by power-up; CPU self-tests, loads program data, executes from the start |
| Warm restart | Process image and non-retentive M/T/C reset, retentive data kept, OB100
|
Moving the mode switch from STOP to RUN with the CPU already powered; no self-test, executes from the start |
| Hot restart | All data keeps last valid values, resumes at the interruption point, OB101, S7-400 plus battery |
Forcing RUN → STOP → RUN from PG/PC; execution continues from the pre-STOP state |
The direct contradiction is the power cycle. The informal model calls power-up a cold restart; the configuration model states that power-up executes the configured startup type — automatic warm restart or automatic hot restart. When someone hands you a spec that says "the system shall cold start after power failure," resolve it with three questions before you write any logic:
- Which startup OB must execute —
OB100,OB101, orOB102? - Must DB actual values survive, or must they revert to load-memory initial values?
- What triggers it — a power cycle, a mode-switch transition, or a PG/PC command?
Answer those three and the ambiguity disappears; the wording does not matter after that.
FAQ
Which OB runs on a Siemens warm restart?
OB100 executes before cyclic operation begins. Warm restart is the default startup type when the startup configuration has not been changed.
Does a cold restart clear retentive memory?
Yes. Cold restart initializes the process image, bit memory, timers, and counters, and resets data blocks to the initial values stored in load memory — regardless of whether that data was configured as retentive. OB102 runs at startup.
Why can't I perform a hot restart on my CPU?
Hot restart (OB101) is available only on S7-400 CPUs and only with a backup battery installed. Without the battery there is no retained data for the CPU to resume from.
What does the CRST/WRST switch actually control?
It arbitrates manual restarts only. Set it to CRST for a manual warm restart via STOP → RUN, and to WRST for a manual hot restart. It has no effect on the automatic startup that follows power on.
Does power cycling a Siemens CPU always cause a cold restart?
No. Power OFF → Power ON executes the startup type configured in the CPU properties, which produces an automatic warm restart or an automatic hot restart. Check the configured startup type before assuming data was initialized.