Introduction
A warm start is initiated by a power cut.
After a warm restart, the variables get the values that they had before the power cut as a restore is done by the PLC.
Executing a Warm Restart
Phase |
Description |
---|---|
1 |
Program execution does not resume from the element where the power outage occurred. The remaining program is discarded during the warm restart. Each task restarts from the beginning. |
2 |
The system carries out the following:
|
3 |
The system performs a restart cycle during which it:
|
Processing a Warm Restart by Program
On warm restart, if the application needs to be processed in a
particular way, the program needs to test that %S1
system bit is set to 1 at the start of the MAST task program.
SFC Warm Restart Specific Features
The warm start on Modicon M580 CPU is not considered as a real warm start by the CPU. SFC interpreter does not depend on tasks.
SFC publishes a ws_data
memory
area to the OS that contains SFC section-specific
data to be saved on power down.
At the beginning of chart processing the active steps are saved to ws_data and processing is marked to be in a section that is essential to the application. At the end of chart processing the essential section is unmarked.
If a power down hits into the essential section, it could be detected if this state is active at the beginning (as the scan is aborted and MAST task is restarted from the beginning). In this case, the workspace may be inconsistent and is restored from the saved data.
Additional information from SFCSTEP_STATE variable in located data area is used to reconstruct the state machine.
When a power down occurs, the following is performed:
During first scan,
%S1
= 1, MAST task is executed but FAST and event tasks are not executed.
On power restoral, the following is performed:
clear chart, deregister diagnostics, keep set actions
set steps from saved area
set step times from SFCSTEP_STATE
suppress execution of the P / P1 actions
restores elapsed time for timed actions
%S1
= 1.Output Changes
As soon as a power outage is detected the outputs are set in the fallback position configured: either programmed fallback value or current value.
After power restoral, the outputs remain at 0 until they are updated by the task.