Skip to main content

stopMode

short summary

This method stops the currently running operation mode. If the immediately flag is set, the current operation modewill be aborted and the machine will execute a fast stop. If it is not set, the stop request flag for all nodes will be set and the operation modes should exit with a defined state.

legal notes

| SPDX-FileCopyrightText: © 2024 ekvip automation GmbH <info@ekvip.de> | SPDX-License-Identifier: Apache-2.0 | For details check: Apache-2.0_

.. _Apache-2.0: https://www.apache.org/licenses/LICENSE-2.0

.. </legal notes>

parameters

return: CNM_ReturnTypes.SingleExecutionState

  • SUCCESS: the mode was stopped
  • BUSY: mode is still stopping

example

CASE step OF
0: // choose and set mode
IF (handler.setMode(automaticMode) = SUCCESS ) THEN
step := 1;
END_IF
1: // start mode
IF (handler.startMode() = SUCCESS) THEN
step := 2;
END_IF
2: // stop mode if requested
IF ( stopRequested ) THEN
IF ( handler.stopMode() = SUCCESS ) THEN
step := 0;
END_IF
END_IF
END_CASE

Parameters

NameTypeCommentKind
immediatelyBOOLif this flag is set, the current operation mode will be aborted and the machine will execute a fast stopinput

Code

Declaration

METHOD stopMode : CNM_ReturnTypes.SingleExecutionState
VAR_INPUT
(* if this flag is set, the current operation mode will be aborted and the machine will execute a fast stop *)
immediately :BOOL := FALSE;
END_VAR