ItpGetError
from library version 4.0
ItpGetError is a function that returns the error number. A description of the NC error codes can be found here.
Interface
FUNCTION ItpGetError
VAR_IN_OUT
sNciToPlc: NciChannelToPlc;
END_VAR
Input parameters
Input & output |
Data type |
Description |
---|---|---|
sNciToPlc |
NciChannelToPlc |
The structure of the cyclic channel interface from the NCI to the PLC. |
Return value
Data type |
Description |
---|---|
UINT |
Error number |
![]() | ItpGetError evaluates the variable 'nItpErrCode' from the cyclic interface. |
Sample
VAR
bItpError: BOOL;
nErrId: UINT;
sNciToPlc: NciChannelToPlc;
END_VAR
bItpError := ItpHasError( sNciToPlc );
IF bItpError THEN
nErrId := ItpGetError( sNciToPlc );
…
END_IF
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 |