ItpIsFastMFunc

ItpIsFastMFunc 1:

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

ItpIsFastMFunc 2: Inputs

FUNCTION ItpIsFastMFunc

VAR_IN
    nFastMFuncNo   : INT;
END_VAR

Name

Type

Description

nFastMFuncNo

BOOL

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

ItpIsFastMFunc 3:/ItpIsFastMFunc 4: Inputs/Outputs

VAR_IN_OUT
    sNciToPlc           : NCTOPLC_NCICHANNEL_REF;
END_VAR

Name

Type

Description

sNciToPlc

NCTOPLC_NCICHANNEL_REF

The structure of the cyclic channel interface from the NCI to the PLC. This structure is read-only (type: NCTOPLC_NCICHANNEL_REF).

ItpIsFastMFunc 5: Return value

Name

Type

Description

ItpIsFastMFunc

BOOL

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

ItpIsFastMFunc 6:

ItpIsFastMFunc evaluates the variable 'nFastMFuncMask' from the cyclic interface.

Example

(*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