ItpGetError

ItpGetError 1:

The function ItpGetError returns the error number, see description of NC error codes.

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

ItpGetError 4: Return value

Name

Type

Description

ItpGetError

UDINT

Error number

ItpGetError 5:

ItpGetError evaluates the variable 'nItpErrCode' from the cyclic interface.

Example

VAR
    bItpError      : BOOL;
    nErrId         : UDINT;
    sNciToPlc AT%I*: NCTOPLC_NCICHANNEL_REF;
END_VAR
bItpError := ItpHasError( sNciToPlc );
IF bItpError THEN
    nErrId := ItpGetError( sNciToPlc );
    …
END_IF

Requirements

Development environment

Target platform

PLC libraries to be linked

TwinCAT v3.1.0

PC or CX (x86 or x64)

Tc2_NCI