PLC Library: TcPlcInterpolation

The TcPlcInterpolation library offers an alternative to the application of G-Code (DIN 66025). This library can be used to execute interpolated motion commands directly from the PLC, without using G-Code.

In a first step a table of different movement commands and additional functions is written. To this end structures such as ST_NciGeoLine are transferred to the FB NciFeedTablePreparation. This appends the movement command to the table. Once the table is full or all required entries have been added, NciFeedTable is called in order to transfer the table content to the NC kernel. The data transfer directly starts the execution.

Function blocks required for grouping of axes or channel control (channel override) are located in the libraries ‚TcNcCfg.lib‘ and ‚TcNci.lib‘.

Function Block

Description

FB_NciFeedTablePreparation

Fills a table with NCI movements in the PLC

FB_NciFeedTable

Transfers a previously written table to the NC kernel and starts the motion

The following structures can be used as input parameters for the function block NciFeedTablePreparation:

Structures

Enum

Description

Organization

 

E_NciEntryTypeNone

No function

ST_NciGeoStart

E_NciEntryTypeGeoStart

Sets the starting position for the first geometry entry

ST_NciEndOfTables

E_NciEntryTypeEndOfTables

Indicates the end of the geometry table

Movement commands

ST_NciGeoLine

E_NciEntryTypeGeoLine

Describes a straight line

ST_NciGeoCirclePlane

E_NciEntryTypeGeoCirclePlane

Describes a circle in the main plane (center point programming)

ST_NciGeoCircleCIP

E_NciEntryTypeGeoCircleCIP

Describes a circle anywhere in the space

ST_NciGeoBezier3

E_NciEntryTypeGeoBezier3

Describes a 3rd order Bezier with control points

ST_NciGeoBezier5

E_NciEntryTypeGeoBezier5

Describes a 5th order Bezier with control points

ST_NciDwellTime

E_NciEntryTypeDwellTime

Describes a dwell time

Path parameters

ST_NciBaseFrame

E_NciEntryTypeBaseFrame

Describes a zero shift and rotation

ST_NciVertexSmoothing

E_NciEntryTypeVertexSmoothing

Activates blending at segment transitions

ST_NciTangentialFollowingDesc

E_NciEntryTypeTfDesc

Activates tangential following of the tool

Dynamics

ST_NciDynOvr

E_NciEntryTypeDynOvr

Modifies the dynamic override

ST_NciAxisDynamics

E_NciEntryTypeAxisDynamics

Limits the axis dynamics

ST_NciPathDynamics

E_NciEntryTypePathDynamics

Limits the path dynamics

Parameter commands

ST_NciHParam

E_NciEntryTypeHParam

Sets an H-parameter (DINT)

ST_NciSParam

E_NciEntryTypeSParam

Sets an S-parameter (WORD)

ST_NciTParam

E_NciEntryTypeTParam

Sets a T-parameter (WORD)

ST_NciMFuncFast

E_NciEntryTypeMFuncFast

Parameterizes a fast M-function (no handshake)

ST_NciMFuncHsk

E_NciEntryTypeMFuncHsk

Parameterizes an M-function with handshake

ST_NciMFuncResetAllFast

E_NciEntryTypeResetAllFast

Resets all fast M-functions

Prerequisites

Development environment

Target system

PLC libraries to include

TwinCAT v2.10

PC (i386)

TcPlcInterpolation.lib