ItpIsFastMFunc

from library version 4.0

ItpIsFastMFunc 1:

ItpIsFastMFunc 2:

ItpIsFastMFunc is a function that determines whether the fast M-function is set for the supplied M-function number.

Interface

FUNCTION ItpIsFastMFunc

VAR_IN
nFastMFuncNo   : INT;
END_VAR
VAR_IN_OUT
sNciToPlc      : NciChannelToPlc;
END_VAR

NciChannelToPlc

Input parameters

Input

Data type

Description

nFastMFuncNo

INT

Number of the M-function that is to be checked.

Input & output

Data type

Description

sNciToPlc

NciChannelToPlc

The structure of the cyclic channel interface from the NCI to the PLC

Return value

The function returns TRUE if the fast bit of the M-function is set.

ItpIsFastMFunc 3:

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: NciChannelToPlc
enFastMFuncs: FastMFuncs;
bTurnFanOn: BOOL;
END_VAR
bTurnFanOn := ItpIsFastMFunc( M12_FanOn,sNciToPlc ); 

Requirements

Development Environment

Target System

PLC libraries to include

TwinCAT v2.7.0

PC (i386)

TcNciItp.lib

TwinCAT v2.8.0

PC (i386)

TcNci.lib