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 |
---|---|
Fills a table with NCI movements in the PLC | |
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 |
E_NciEntryTypeGeoStart |
Sets the starting position for the first geometry entry | |
E_NciEntryTypeEndOfTables |
Indicates the end of the geometry table | |
Movement commands | ||
E_NciEntryTypeGeoLine |
Describes a straight line | |
E_NciEntryTypeGeoCirclePlane |
Describes a circle in the main plane (center point programming) | |
E_NciEntryTypeGeoCircleCIP |
Describes a circle anywhere in the space | |
E_NciEntryTypeGeoBezier3 |
Describes a 3rd order Bezier with control points | |
E_NciEntryTypeGeoBezier5 |
Describes a 5th order Bezier with control points | |
E_NciEntryTypeDwellTime |
Describes a dwell time | |
Path parameters | ||
E_NciEntryTypeBaseFrame |
Describes a zero shift and rotation | |
E_NciEntryTypeVertexSmoothing |
Activates blending at segment transitions | |
E_NciEntryTypeTfDesc |
Activates tangential following of the tool | |
Dynamics | ||
E_NciEntryTypeDynOvr |
Modifies the dynamic override | |
E_NciEntryTypeAxisDynamics |
Limits the axis dynamics | |
E_NciEntryTypePathDynamics |
Limits the path dynamics | |
Parameter commands | ||
E_NciEntryTypeHParam |
Sets an H-parameter (DINT) | |
E_NciEntryTypeSParam |
Sets an S-parameter (WORD) | |
E_NciEntryTypeTParam |
Sets a T-parameter (WORD) | |
E_NciEntryTypeMFuncFast |
Parameterizes a fast M-function (no handshake) | |
E_NciEntryTypeMFuncHsk |
Parameterizes an M-function with handshake | |
E_NciEntryTypeResetAllFast |
Resets all fast M-functions |
Prerequisites
Development environment |
Target system |
PLC libraries to include |
---|---|---|
TwinCAT v2.10 |
PC (i386) |
TcPlcInterpolation.lib |