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
| Name | Type | Comment | Kind |
|---|---|---|---|
| mode | UDINT | - | input |
| node | CNM_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