Skip to main content

checkModeIsAllowed

Short Summary

This method checks the start conditions for the selected operation mode. If the mode is allowed to be started, it returns TRUE.

  • Return type: BOOL

Parameters

NameTypeCommentKind
modeUDINT-input
nodeCNM_OpModeHandlingInterfaces.INode-input

Code

Declaration

METHOD checkModeIsAllowed : BOOL
VAR_INPUT
mode : UDINT;
node :CNM_OpModeHandlingInterfaces.INode;
END_VAR

Implementation

CASE mode OF
OpMode.HOME, OpMode.MANUAL, OpMode.NO_OPERATION:
checkModeIsAllowed := TRUE;
ELSE
checkModeIsAllowed := node.isInHome;
END_CASE