Stop program execution
- Last UpdatedJul 20, 2024
- 2 minute read
To stop program execution write Stop to the attribute ExecutionStateCmd.
You can stop program execution if the current program execution state is one of the following;
-
Running
-
RunningHeld
-
RunningSingleStep
-
SingleStepTransitionReady.
If the command completes successfully the Execution State (attribute ExecutionState) changes to Stopped.
Note: If you are using sufficiently large scan periods in the hosting AppEngine (such as 5 seconds) and you stop program execution after the current step completes (the conditions are satisfied and the OnExit outputs are written) but before the next execution cycle (in the middle between two execution cycles) then and only then the Current.xxx attributes correspond to the next step. If the step is still evaluating conditions and you stop program execution then Current.xxx attributes point to the current step.
The following table shows you how the target state and target state timer change depending on the current execution state when the ExecutionStateCmd is set to Stop. It also shows you whether the On Exit and On Entry values are written:
|
Current state |
Target state |
Execute OnExit Execute OnEntry |
|---|---|---|
|
Running |
State: Stopped |
OnExit: No |
|
RunningHeld |
State: Stopped |
OnExit: No |
|
RunningSingleStep |
State: Stopped |
OnExit: No |
|
SingleStepTransitionReady |
State: Stopped |
OnExit: No |
For a detailed overview of the execution state attribute and its properties, see Sequencer object help.
For a detailed overview of the state transition and information on quality, timers and target steps that are effected by this execution command, see Sequencer state transition tables.