Skip to main content

executeCommand

Short summary

Executes the action associated with this command.

Parameters

NameTypeCommentKind
executeBOOLcontrol bit to start or abort the commandinput

Code

Declaration

METHOD executeCommand : CNM_ReturnTypes.SingleExecutionState
VAR_INPUT
(*control bit to start or abort the command*)
execute : BOOL;
END_VAR

Implementation

THIS^.timer(IN := execute AND (THIS^.waitTime <> T#0S), PT := THIS^.waitTime);
IF(THIS^.timer.Q OR_ELSE THIS^.waitTime = T#0S)THEN
executeCommand := CNM_ReturnTypes.SingleExecutionState.SUCCESS;
ELSE
executeCommand := CNM_ReturnTypes.SingleExecutionState.BUSY;
END_IF