ItpIsFastMFunc
ItpIsFastMFunc is a function that determines whether the fast M-function is set for the supplied M-function number.
VAR_IN
FUNCTION ItpIsFastMFunc
VAR_IN
nFastMFuncNo : INT;
END_VAR
nFastMFuncNo: Number of the M-function that is to be checked.
VAR_IN_OUT
VAR_IN_OUT
sNciToPlc : NCTOPLC_NCICHANNEL_REF;
END_VAR
sNciToPlc: The structure of the cyclic channel interface from the NCI to the PLC. This structure is only accessed for reading. (type: NCTOPLC_NCICHANNEL_REF)
Return value
The function returns TRUE if the fast bit of the M-function is set.
ItpIsFastMFunc evaluates the variable 'nFastMFuncMask' from the cyclic interface. |
Sample
(*this enum is defined by the user *)
TYPE FastMFuncs:
(
M10_CoolingFluidOn := 10, (*fast M-Funktion M10*)
M11_CoolingFluidOff := 11,
M12_FanOn := 12,
M13_FanOff := 13
);
END_TYPE
VAR
sNciToPlc AT%I*: NCTOPLC_NCICHANNEL_REF
enFastMFuncs : FastMFuncs;
bTurnFanOn : BOOL;
END_VAR
bTurnFanOn := ItpIsFastMFunc( M12_FanOn,sNciToPlc );
Requirements
Development environment |
Target platform |
PLC libraries to be linked |
---|---|---|
TwinCAT v3.1.0 |
PC or CX (x86 or x64) |
Tc2_NCI |