ItpHasError

from library version 4.0

ItpHasError 1:

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

Interface

FUNCTION ItpHasError : BOOL

VAR_IN_OUT
sNciToPlc      : NciChannelToPlc;
END_VAR

NciChannelToPlc

Input parameters

Input & output

Data type

Description

sNciToPlc

NciChannelToPlc

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

Return value

If there is an error, the function returns TRUE.

ItpHasError 2:

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

Sample

VAR
bItpError: BOOL;
sNciToPlc: NciChannelToPlc;
END_VAR
bItpError := ItpHasError( 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