PLC Library: NCI Interpreter
The TwinCAT library TcNci.lib contains function blocks for operation of the NC interpreter from the PLC.
The following function blocks are contained in the TcNci.lib library.
Function block | Description |
---|---|
Acknowledges an M-function of type handshake | |
Triggers “Delete Distance to go” in the NC | |
Executes a user-defined standard G-Code before the start of each NC program | |
Triggers the NCI EStop | |
Provides the block number of the NC program for the cyclic interface | |
Provides the value of the look-ahead for bottleneck detection | |
Provides the response mode for bottleneck detection | |
Provides the channel ID | |
Provides the channel type of the cyclic interface | |
Provides the index offset of the LREAL variables used in the cyclic channel interface | |
Provides the index offset of the UDINT variables used in the cyclic channel interface | |
Provides the error number | |
Provides the axis IDs that were configured for the group | |
Provides the group ID | |
Provides the current H-parameter from the NC | |
Provides the current M-function number of type handshake | |
Provides the current version of the cyclic interface | |
Provides the channel override in percent | |
Provides the current S-parameter from the NC | |
Provides the current interpreter state | |
Provides the current T-parameter from the NC | |
Provides the version number of this library | |
Triggers the GoAhead function (decoder stop with external trigger event) | |
Determines whether an error is present | |
Determines whether the M-function number provided is present in the form of a fast M-function | |
Determines whether an EStop is executed or pending | |
Determines whether an M-function of type handshake is present | |
Loads an NC program using program names | |
Reads the first LReal parameter from the cyclic channel interface | |
Reads the first UDINT parameter from the cyclic channel interface | |
Reads arithmetic parameters | |
Reads the tool description from the NC | |
Reads the zero offset shift from the NC | |
Carries out a reset of the interpreter or of the NC channel | |
Resets a fast signal bit | |
Sets the value of the look-ahead for bottleneck detection | |
Sets the response mode when bottleneck detection is switched on | |
Sets the index offsets of the LREAL variables used in the cyclic channel interface | |
Sets the index offsets of the UDINT variables used in the cyclic channel interface | |
Sets the channel override in percent | |
Optionally sets the search path for subroutines | |
Sets all tool parameters (including number and type) to zero | |
Set all zero offset shifts to null | |
Enables or disables the single block mode in the NCI. | |
Starts or stops the interpreter (NC channel) | |
Enables further processing of the parts program after an NCI EStop | |
Writes arithmetic parameters | |
Writes the tool description into the NC | |
Writes the zero offset shift into the NC | |
Block search (for description of the functionality see Blocksearch) | |
Sets the interpreter to a user-defined location, so that NC program execution continues from this point. | |
Reads the current state after an NC program interruption. | |
Starts the motion after a block search. | |
Retrace | |
Enables the backup list for retracing | |
Reads whether the backup list for retracing is active | |
Reads whether the start position is reached during retracing | |
Reads whether feeder entries were sent from the backup list | |
Reads whether backward movement occurs on the current path | |
Performs a backward movement on the path | |
Performs a forward movement on the path. This is called to cancel retracing. |
Requirements
The library to be integrated depends on the TwinCAT version. From TwinCAT version 2.8 TcNci.lib should be used. For older versions TcNciItp.lib should be used. The interface for the function blocks etc. of both libraries is the same.
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT v2.7.0 | PC (i386) | TcNciItp.lib |
from TwinCAT v2.8.0 | PC (i386) | TcNci.lib |
Function blocks for compatibility with existing programs:
![]() | Function blocks for compatibility The purpose of the function blocks listed is to ensure compatibility with existing projects. It is not advisable to use these function blocks for new projects. Instead, the equivalent function blocks shown in the table above should be used. |
Function block | Description |
---|---|
Triggers “Delete Distance to go” in the NC | |
Triggers the NCI EStop | |
Provides the value of the look-ahead for bottleneck detection | |
Provides the response mode for bottleneck detection | |
Triggers the GoAhead function | |
Determines whether an EStop is executed or pending | |
Loads an NC program using program names | |
Reads arithmetic parameters | |
Reads the tool description from the NC | |
Reads the zero offset shift from the NC | |
Carries out a reset of the interpreter or of the NC channel | |
Carries out a reset of the interpreter or of the NC channel. | |
Resets a fast signal bit | |
Sets the value of the look-ahead for bottleneck detection | |
Sets the response mode when bottleneck detection is switched on | |
Optionally sets the search path for subroutines | |
Sets all tool parameters (including number and type) to zero | |
Sets all origins to zero | |
Starts or stops the interpreter (NC channel) | |
Enables further processing of the parts program after an NCI EStop | |
Writes arithmetic parameters | |
Writes the tool description into the NC | |
Writes the zero offset shift into the NC |
- ItpConfirmHsk
- ItpDelDtgEx
- ItpEnableDefaultGCode
- ItpEStopEx
- ItpGetBlockNumber
- ItpGetBottleNeckLookAheadEx
- ItpGetBottleNeckModeEx
- ItpGetChannelId
- ItpGetChannelType
- ItpGetCyclicLrealOffsets
- ItpGetCyclicUDintOffsets
- ItpGetError
- ItpGetGroupAxisIds
- ItpGetGroupId
- ItpGetHParam
- ItpGetHskMFunc
- ItpGetItfVersion
- ItpGetOverridePercent
- ItpGetSParam
- ItpGetStateInterpreter
- ItpGetTParam
- ItpGetVersion
- ItpGoAheadEx
- ItpHasError
- ItpIsFastMFunc
- ItpIsEStopEx
- ItpIsHskMFunc
- ItpLoadProgEx
- ItpReadCyclicLRealParam1
- ItpReadCyclicUdintParam1
- ItpReadRParamsEx
- ItpReadToolDescEx
- ItpReadZeroShiftEx
- ItpResetEx2
- ItpResetFastMFuncEx
- ItpSetBottleNeckLookAheadEx
- ItpSetBottleNeckModeEx
- ItpSetCyclicLrealOffsets
- ItpSetCyclicUDintOffsets
- ItpSetOverridePercent
- ItpSetSubroutinePathEx
- ItpSetToolDescNullEx
- ItpSetZeroShiftNullEx
- ItpSingleBlock
- ItpStartStopEx
- ItpStepOnAfterEStopEx
- ItpWriteRParamsEx
- ItpWriteToolDescEx
- ItpWriteZeroShiftEx
- Blocksearch
- Retrace
- Blocks for compatibility with existing programs