ItpHasError

ItpHasError 1:

The function ItpHasError determines whether the interpreter is in an error state.

ItpHasError 2:/ItpHasError 3: 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).

ItpHasError 4: Return value

Name

Type

Description

ItpHasError

BOOL

If there is an error, the function returns TRUE.

ItpHasError 5:

ItpHasError evaluates the variable 'nItpErrCode' from the cyclic interface. If this value does not equal 0, TRUE is returned.

Example

VAR
    bItpError      : BOOL;
    sNciToPlc AT%I*: NCTOPLC_NCICHANNEL_REF;
END_VAR
bItpError := ItpHasError( sNciToPlc ); 

Requirements

Development environment

Target platform

PLC libraries to be linked

TwinCAT v3.1.0

PC or CX (x86 or x64)

Tc2_NCI