Skip to main content

stopModeRequestStep

Short Summary

This method stops the operation mode via stop request if the stop request button from the HMI was pressed.

  • Return type: DINT

Parameters

none

Code

Declaration

METHOD PRIVATE stopModeRequestStep : DINT

Implementation

stopModeRequestStep := STOP_MODE_REQUEST;
// clear stepping on all nodes
THIS^.modeHandler.rootNode.enableStepping := FALSE;
// set buttons
THIS^.buttons.Start.enabled := FALSE;
THIS^.buttons.Stop.enabled := TRUE;
THIS^.buttons.StopRequest.enabled := FALSE;
THIS^.buttons.Pause.visible := FALSE;
THIS^.buttons.StepMode.visible := FALSE;
IF (THIS^.buttons.Stop.pressed) THEN
stopModeRequestStep := STOP_MODE_IMMEDIATE;
RETURN;
END_IF
// stop via handler
IF (THIS^.modeHandler.stopMode() = CNM_ReturnTypes.SingleExecutionState.SUCCESS)
THEN
THIS^.buttons.Start.enabled := TRUE;
THIS^.buttons.Stop.enabled := FALSE;
THIS^.buttons.StopRequest.enabled := FALSE;
stopModeRequestStep := SELECT_MODE;
END_IF