stopModeImmediateStep
Short Summary
This method stops the operation mode immediately if the stop button from the HMI was pressed.
- Return type:
DINT
Parameters
none
Code
Declaration
METHOD PRIVATE stopModeImmediateStep : DINT
Implementation
stopModeImmediateStep := STOP_MODE_IMMEDIATE;
// clear stepping on all nodes
THIS^.modeHandler.rootNode.enableStepping := FALSE;
// set buttons
THIS^.buttons.Start.enabled := FALSE;
THIS^.buttons.Stop.enabled := FALSE;
THIS^.buttons.StopRequest.enabled := FALSE;
THIS^.buttons.Pause.visible := FALSE;
THIS^.buttons.StepMode.visible := FALSE;
// stop via handler
IF (THIS^.modeHandler.stopMode(immediately := TRUE) = CNM_ReturnTypes.SingleExecutionState.SUCCESS)
THEN
THIS^.buttons.Start.enabled := TRUE;
THIS^.buttons.Stop.enabled := FALSE;
THIS^.buttons.StopRequest.enabled := FALSE;
THIS^.buttons.Pause.visible := FALSE;
THIS^.buttons.StepMode.visible := FALSE;
stopModeImmediateStep := SELECT_MODE;
END_IF