Before the CPU can start processing the user program, a startup program must first be executed. By programming startup OBs in your startup program, you can specify certain settings for your cyclic program.
There are three types of startup: warm restart, cold restart, and hot restart. A hot restart is only possible on S7-400 CPUs. This must be set explicitly in the parameter set for the CPU using STEP 7.
The features of the STARTUP mode are as follows:
- The program in the startup OB is processed (OB100 for warm restart, OB101 for hot restart, OB102 for cold restart).
- No time-driven or interrupt driven program execution is possible.
- Timers are updated.
- Runtime meters start running.
- Disabled digital outputs on signal modules (can be set by direct access).
Warm Restart
A warm restart is always permitted unless the system has requested a memory reset. A warm restart is the only possible option after:
- Memory reset
- Downloading the user program with the CPU in STOP mode
- I stack/B stack overflow
- Warm restart aborted (due to a power outage or changing the mode selector setting)
- When the interruption before a hot restart exceeds the selected time limit.
Manual Warm Restart
A manual warm restart can be triggered by the following:
-
The mode selector
- (the CRST/WRST switch - if available - must be set to CRST)
-
The corresponding command on the programming device or by communication functions
- (if the mode selector is set to RUN or RUN致)
Automatic Warm Restart
An automatic warm restart can be triggered following power up in the following situations:
- The CPU was not in STOP mode when the power outage occurred.
- The mode selector is set to RUN or RUN致.
- No automatic hot restart is programmed following power up.
- The CPU was interrupted by a power outage during a warm restart (regardless of the programmed type of restart).
The CRST/WRST switch has no effect on an automatic warm restart.
Automatic Warm Restart Without a Backup Battery
If you operate your CPU without a backup battery (if maintenance苯ree operation is necessary), the CPU memory is automatically reset and a warm restart executed after the power is turned on or when power returns following a power outage. The user program must be located on a flash EPROM (memory card).
Hot Restart
Following a power outage in RUN mode followed by a return of power, S7-400 CPUs run through an initialization routine and then automatically execute a hot restart. During a hot restart, the user program is resumed at the point at which its execution was interrupted. The section of user program that had not been executed before the power outage is known as the remaining cycle. The remaining cycle can also contain time-driven and interrupt driven program sections.
A hot restart is only permitted when the user program was not modified in STOP mode (for example, by reloading a modified block) and when there are no other reasons for a warm restart. Both a manual and automatic hot restart are possible.
Manual Hot Restart
A manual hot restart is only possible with the appropriate parameter settings in the parameter set of the CPU and when the STOP resulted from the following causes:
- The mode selector was changed from RUN to STOP.
- User-programmed STOPs, STOPs after calling OBs that are not loaded.
- The STOP mode was the result of a command from the programming device or a communication function.
A manual hot restart can be triggered by the following:
-
The mode selector
- The CRST/WRST must be set to WRST.
-
The corresponding command on the programming device or by communication functions (mode selector set to RUN or RUN致).
-
When a manual hot restart is set in the parameter set of the CPU.
Automatic Hot Restart
An automatic hot restart can be triggered following power up in the following situations:
- The CPU was not in STOP or HOLD mode when the power outage occurred.
- The mode selector is set to RUN or RUN致.
- Automatic hot restart following power up is set in the parameter set of the CPU.
The CRST/WRST switch has no effect on an automatic hot restart.