handleCycleManagerPause
Short summary
This method handles the pausing of the cycle manager. Should be handled before updating.
Parameters
| Name | Type | Comment | Kind |
|---|---|---|---|
| pause | BOOL | if true and Pausing Enabled and busy will proceed with PAUSE | input |
Code
Declaration
METHOD PROTECTED handleCycleManagerPause
VAR_INPUT
(*if true and Pausing Enabled and busy will proceed with PAUSE*)
pause :BOOL;
END_VAR
Implementation
IF(NOT pause AND_THEN THIS^.currentState = CNM_ReturnTypes.SingleExecutionState.PAUSED)THEN
THIS^.currentStep := THIS^.lastStepBeforePause;
END_IF
RETURN (NOT THIS^.currentPauseEnabled);
IF(
pause
AND_THEN (NOT THIS^.wasError)
AND_THEN (THIS^.currentState = CNM_ReturnTypes.SingleExecutionState.BUSY)
)THEN
THIS^.lastStepBeforePause := THIS^.currentStep;
THIS^.currentStep := STEP_PAUSE;
END_IF