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:

  • Restore the application variable values,

  • Set %S1 system bit to 1.

  • Initialize message and event queues,

  • Send configuration parameters to all I/O and application-specific modules,

  • If the application was reserved, the CPU removes the reservation.

  • Reset communication.

  • If needed, the CPU configures the I/O modules with the current adjustment parameters.

  • Disable FAST, AUX, and event tasks.

3

The system performs a restart cycle during which it:

  • Restarts the MAST task from beginning of cycle,

  • Sets %S1 system bit to 0 when the MAST task is completed.

  • Enable FAST, AUX, and event tasks at the end of the first MAST task cycle.

  • CPU state set to the value before power down.

    If the CPU was in HALT state, it is set to STOP state.

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

NOTE: SFC interpreter is independent, if the transition is valid, the SFC chart evolves while %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.