Overview
A cold start is an initialization initiated by the Reset button of the power supply or the
command in Control Expert.The consequence of a cold start is the re-initialization of all the variables. They get their default values.
CPU Cold Start Causes and States
Cold start causes and resulting CPU states:
Cause |
Resulting CPU State |
---|---|
End of the application download. |
STOP |
Application restored from flash memory is different than the one in the non-persistent application RAM. Use case:
|
STOP(1.) |
Application restored from persistent memory with Control Expert command RAM: is different than the one in the non-persistent application
|
STOP(1.) |
Power supply RESET button pressed. |
STOP(1.) |
Power supply RESET button pressed less than 500 ms after a power down. |
STOP(1.) |
Power supply RESET button pressed after a CPU detected error, except in the case of a watchdog detected error (halt state). |
STOP(2.) |
Init requested with one of the 3 following means:
|
The CPU does not change its state. It only initializes the application. It is a simulation of cold start. |
Restoral after power down with a loss of context. |
STOP(1.) |
1. CPU state is set to RUN if Automatic start in Run option is selected. 2. Automatic start in Run option does not set the CPU to RUN state. |
Loading or transferring an application to the CPU involves initialization of unlocated variables.
You need to assign a topological address to the data if the process requires keeping the current values of the data when transferring the application.
To save the located variables, avoid the initialization of the %MWi
by unchecking parameter in the CPU configuration
screen.
%MWi
and initial values are loaded.%MWi
to be reset and loaded
with initial values.Executing a Cold Start
Use these steps to perform a cold start:
Phase |
Description |
---|---|
1 |
The startup is performed in RUN or in STOP state depending on one of the 2 following conditions:
Program execution is resumed at the start of the cycle. |
2 |
The system carries out the following:
|
3 |
To start a cycle, the system performs these tasks:
|
Processing a Cold Start by Program
Test %SW10.0
system bit to detect
a cold start and adapt the program consequently.
%S0
system
bit on the first execution cycle if the parameter is selected. If it
is not selected, the CPU starts in STOP state
and the bit %S0
switches to 1 on the
first cycle after start (not visible for the program).Output Changes
As soon as a power outage is detected the outputs are set in the fallback position configured (programmed fallback value or current value).
On power down, the outputs are not driven and remain at 0.
After power restoral, the outputs remain at 0 until they are updated by the task.