Commanding State Transitions

Run Command

Effect: Commands a transition to the RUNNING controller state.

Starting Conditions: BOOTING or STOPPED state.

Methods for Issuing a Run Command:

oRun/Stop switch goes from stop to run.

oEcoStruxure Machine Expert Online Menu: Select the Start command.

oRUN command from Web Server

oBy an external call via Modbus request using the PLC_W.q_wPLCControl and PLC_W.q_uiOpenPLCControl system variables of the M251 PLCSystem library.

oLogin with online change option: An online change (partial download) initiated while the controller is in the RUNNING state returns the controller to the RUNNING state if successful.

oMultiple Download Command: sets the controllers into the RUNNING state if the Start all applications after download or online change option is selected, irrespective of whether the targeted controllers were initially in the RUNNING, STOPPED, HALT, or EMPTY state.

oThe controller is restarted into the RUNNING state automatically under certain conditions.

Refer to Controller State Diagram for further details.

Stop Command

Effect: Commands a transition to the STOPPED controller state.

Starting Conditions: BOOTING, EMPTY, or RUNNING state.

Methods for Issuing a Stop Command:

oRun/Stop switch goes from run to stop.

oEcoStruxure Machine Expert Online Menu: Select the Stop command.

oSTOP command from WebServer

oBy an internal call by the application or an external call via Modbus request using the PLC_W. q_wPLCControl and PLC_W. q_uiOpenPLCControl system variables of the M251 PLCSystem library.

oLogin with online change option: An online change (partial download) initiated while the controller is in the STOPPED state returns the controller to the STOPPED state if successful.

oDownload Command: implicitly sets the controller into the STOPPED state.

oMultiple Download Command: sets the controllers into the STOPPED state if the Start all applications after download or online change option is not selected, irrespective of whether the targeted controllers were initially in the RUNNING, STOPPED, HALT, or EMPTY state.

oREBOOT by Script: The file transfer script on an SD card can issue a REBOOT as its final command. The controller will be rebooted into the STOPPED state provided the other conditions of the boot sequence allow this to occur. Refer to Reboot for further details.

oThe controller is restarted into the STOPPED state automatically under certain conditions.

Refer to Controller State Diagram for further details.

Reset Warm

Effect: Resets all variables, except for the remanent variables, to their default values. Places the controller into the STOPPED state.

Starting Conditions: RUNNING, STOPPED, or HALT states.

Methods for Issuing a Reset Warm Command:

oEcoStruxure Machine Expert Online Menu: Select the Reset warm command.

oBy an internal call by the application or an external call via Modbus request using the PLC_W. q_wPLCControl and PLC_W. q_uiOpenPLCControl system variables of the M251 PLCSystem library.

Effects of the Reset Warm Command:

1.The application stops.

2.Forcing is erased.

3.Diagnostic indications for errors are reset.

4.The values of the retain variables are maintained.

5.The values of the retain-persistent variables are maintained.

6.All non-located and non-remanent variables are reset to their initialization values.

7.The values of the first 1000 %MW registers are maintained.

8.The values of %MW1000 to %MW59999 registers are reset to 0.

9.All fieldbus communications are stopped and then restarted after the reset is complete.

10.All inputs are reset to their initialization values. All outputs are reset to their software initialization values or their default values if no software initialization values are defined.

11.The Post Configuration file is read.

For details on variables, refer to Remanent Variables.

Reset Cold

Effect: Resets all variables, except for the retain-persistent type of remanent variables, to their initialization values. Places the controller into the STOPPED state.

Starting Conditions: RUNNING, STOPPED, or HALT states.

Methods for Issuing a Reset Cold Command:

oEcoStruxure Machine Expert Online Menu: Select the Reset cold command.

oBy an internal call by the application or an external call via Modbus request using the PLC_W. q_wPLCControl and PLC_W. q_uiOpenPLCControl system variables of the M251 PLCSystem library.

Effects of the Reset Cold Command:

1.The application stops.

2.Forcing is erased.

3.Diagnostic indications for errors are reset.

4.The values of the retain variables are reset to their initialization value.

5.The values of the retain-persistent variables are maintained.

6.All non-located and non-remanent variables are reset to their initialization values.

7.The values of the first 1000 %MW registers are maintained.

8.The values of %MW1000 to %MW59999 registers are reset to 0.

9.All fieldbus communications are stopped and then restarted after the reset is complete.

10.All inputs are reset to their initialization values. All outputs are reset to their software initialization values or their default values if no software initialization values are defined.

11.The Post Configuration file is read.

For details on variables, refer to Remanent Variables.

Reset Origin

Effect: Resets all variables, including the remanent variables, to their initialization values. Erases all user files on the controller. Places the controller into the EMPTY state.

Starting Conditions: RUNNING, STOPPED, or HALT states.

Methods for Issuing a Reset Origin Command:

oEcoStruxure Machine Expert Online Menu: Select the Reset origin command.

Effects of the Reset Origin Command:

1.The application stops.

2.Forcing is erased.

3.All user files (Boot application, data logging, Post Configuration) are erased.

4.Diagnostic indications for errors are reset.

5.The values of the retain variables are reset.

6.The values of the retain-persistent variables are reset.

7.All non-located and non-remanent variables are reset.

8.The values of the first 1000 %MW registers are reset to 0.

9.The values of %MW1000 to %MW59999 registers are reset to 0.

10.All fieldbus communications are stopped.

11.All other inputs are reset to their initialization values. All other outputs are reset to their hardware initialization values.

For details on variables, refer to Remanent Variables.

Reboot

Effect: Commands a reboot of the controller.

Starting Conditions: Any state.

Methods for Issuing the Reboot Command:

oPower cycle

oREBOOT by Script

Effects of the Reboot:

1.The state of the controller depends on a number of conditions:

a.The controller state will be RUNNING if:

The Reboot was provoked by a power cycle and:

- the Starting Mode is set to Start in run, and if the Run/Stop input is not configured, and if the controller was not in HALT state before the power cycle, and if the remanent variables are valid.

- the Starting Mode is set to Start in run, and if the Run/Stop input is configured and set to RUN, and if the controller was not in HALT state before the power cycle, and if the remanent variables are valid.

- the Starting Mode is set to Start as previous state, and Controller state was RUNNING before the power cycle, and if the Run/Stop input is set to not configured and the boot application has not changed and the remanent variables are valid.

- the Starting Mode is set to Start as previous state, and Controller state was RUNNING before the power cycle, and if the Run/Stop input is configured and is set to RUN.

The Reboot was provoked by a script and:

- the Starting Mode is set to Start in run, and if the Run/Stop input or switch is configured and set to RUN, and if the controller was not in HALT state before the power cycle, and if the remanent variables are valid.

b.The controller state will be STOPPED if:

The Reboot was provoked by a power cycle and:

- the Starting Mode is set to Start in stop.

- the Starting Mode is set to Start as previous state and the controller state was not RUNNING before the power cycle.

- the Starting Mode is set to Start as previous state and the controller state was RUNNING before the power cycle, and if the Run/Stop input is set to not configured, and if the boot application has changed.

- the Starting Mode is set to Start as previous state and the controller state was RUNNING before the power cycle, and if the Run/Stop input is set to not configured, and if the boot application has not changed, and if the remanent variables are not valid.

- the Starting Mode is set to Start as previous state and the controller state was RUNNING before the power cycle, and if the Run/Stop input is configured and is set to STOP.

- the Starting Mode is set to Start in run and if the controller state was HALT before the power cycle.

- the Starting Mode is set to Start in run, and if the controller state was not HALT before the power cycle, and if the Run/Stop input is configured and is set to STOP.

- the Starting Mode is set to Start as previous state and if the Run/Stop input or switch is configured and set to RUN, and if the controller was not in HALT state before the power cycle.

- the Starting Mode is set to Start as previous state and if the Run/Stop input or switch is not configured, and if the controller was not in HALT state before the power cycle.

c.The controller state will be EMPTY if:

- There is no boot application or the boot application is invalid, or

- The reboot was provoked by specific System Errors.

d.The controller state will be INVALID_OS if there is no valid firmware.

2.Forcing is maintained if the boot application is loaded successfully. If not, forcing is erased.

3.Diagnostic indications for errors are reset.

4.The values of the retain variables are restored if saved context is valid.

5.The values of the retain-persistent variables are restored if saved context is valid.

6.All non-located and non-remanent variables are reset to their initialization values.

7.The values of the first 1000 %MW registers are restored if saved context is valid.

8.The values of %MW1000 to %MW59999 registers are reset to 0.

9.All fieldbus communications are stopped and restarted after the boot application is loaded successfully.

10.All inputs are reset to their initialization values. All outputs are reset to their hardware initialization values and then to their software initialization values or their default values if no software initialization values are defined.

11.The Post Configuration file is read.

12.The controller file system is initialized and its resources (sockets, file handles, and so on) are deallocated.

The file system employed by the controller needs to be periodically re-established by a power cycle of the controller. If you do not perform regular maintenance of your machine, or if you are using an Uninterruptible Power Supply (UPS), you must force a power cycle (removal and reapplication of power) to the controller at least once a year.

NOTICE

DEGRADATION OF PERFORMANCE

Reboot your controller at least once a year by removing and then reapplying power.

Failure to follow these instructions can result in equipment damage.

For details on variables, refer to Remanent Variables.

NOTE: The Check context test concludes that the context is valid when the application and the remanent variables are the same as defined in the Boot application.

NOTE: If you make an online change to your application program while your controller is in the RUNNING or STOPPED state but do not manually update your Boot application, the controller will detect a difference in context at the next reboot, the remanent variables will be reset as per a Reset cold command, and the controller will enter the STOPPED state.

Download Application

Effect: Loads your application executable into the RAM memory. Optionally, creates a Boot application in the Flash memory.

Starting Conditions: RUNNING, STOPPED, HALT, and EMPTY states.

Methods for Issuing the Download Application Command:

oEcoStruxure Machine Expert:

2 options exist for downloading a full application:

oDownload command.

oMultiple Download command.

For important information on the application download commands, refer to Controller State Diagram.

oFTP: Load Boot application file to the Flash memory using FTP. The updated file is applied at the next reboot.

oSD card: Load Boot application file using an SD card in the controller SD card slot. The updated file is applied at the next reboot. Refer to File Transfer with SD Card for further details.

Effects of the EcoStruxure Machine Expert Download Command:

1.The existing application stops and then is erased.

2.If valid, the new application is loaded and the controller assumes a STOPPED state.

3.Forcing is erased.

4.Diagnostic indications for errors are reset.

5.The values of the retain variables are reset to their initialization values.

6.The values of any existing retain-persistent variables are maintained.

7.All non-located and non-remanent variables are reset to their initialization values.

8.The values of the first 1000 %MW registers are maintained.

9.The values of %MW1000 to %MW59999 registers are reset to 0.

10.All fieldbus communications are stopped and then any configured fieldbus of the new application is started after the download is complete.

11.All inputs are reset to their initialization values. All outputs are reset to their hardware initialization values and then to their software initialization values or their default values if no software initialization values are defined, after the download is complete.

12.The Post Configuration file is read.

For details on variables, refer to Remanent Variables.

Effects of the FTP or SD Card Download Command:

There are no effects until the next reboot. At the next reboot, the effects are the same as a reboot with an invalid context. Refer to Reboot.