Skip to main content

getMode

Short Summary

This method returns the mandatory operation modes depending on the selected operation mode. Use the OpMode enum as input.

Attention:: This class only provides the mandatory operation modes Homing, Automatic and Manual. For other non mandatory or custom modes, extend this class and overwrite this method!

  • Return type: CNM_OpModeHandlingInterfaces.IModeBehaviour

Parameters

NameTypeCommentKind
selectedModeUDINTuse the enum ''OpMode'', e.g. OpMode.AUTOMATICinput

Code

Declaration

METHOD PROTECTED getMode :CNM_OpModeHandlingInterfaces.IModeBehaviour
VAR_INPUT
(* use the enum ''OpMode'', e.g. OpMode.AUTOMATIC *)
selectedMode :UDINT;
END_VAR
VAR_INST
modeFactroy :BasicModeProvider;
END_VAR

Implementation

getMode := modeFactroy.getMode(selectedMode);