Notes on the documentation

This description is only intended for the use of trained specialists in control and automation engineering who are familiar with the applicable national standards.
It is essential that the following notes and explanations are followed when installing and commissioning these components.

The responsible staff must ensure that the application or use of the products described satisfy all the requirements for safety, including all the relevant laws, regulations, guidelines and standards.

Disclaimer

The documentation has been prepared with care. The products described are, however, constantly under development.
For that reason the documentation is not in every case checked for consistency with performance data, standards or other characteristics.
In the event that it contains technical or editorial errors, we retain the right to make alterations at any time and without warning.
No claims for the modification of products that have already been supplied may be made on the basis of the data, diagrams and descriptions in this documentation.

Trademarks

Beckhoff®, TwinCAT®, EtherCAT®, Safety over EtherCAT®, TwinSAFE® and XFC® are registered trademarks of and licensed by Beckhoff Automation GmbH.
Other designations used in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owners.

Patent Pending

The TwinCAT Technology is covered, including but not limited to the following patent applications and patents:
EP0851348, US6167425 with corresponding applications or registrations in various other countries.

Copyright

© Beckhoff Automation GmbH & Co. KG, Germany.
The reproduction, distribution and utilization of this document as well as the communication of its contents to others without express authorization are prohibited.
Offenders will be held liable for the payment of damages. All rights reserved in the event of the grant of a patent, utility model or design.


Overview

In many applications it is necessary to synchronise two or more axes. Axes can be coupled together in the TwinCAT NC PTP. A master axis is then actively controlled, and the position of one or more coupled slave axes is synchronously controlled by the NC.

The simplest type of coupling is linear coupling with a fixed ratio of transmission (an electronic gearbox).

Some applications require a more complex coupling of master and slave, one which can not be described by a simple mathematical formula. Such a dependency can be described by means of a table that specifies an associated slave position for every master position.

The TwinCAT NC PTP offers the possibility of coupling a slave axis to a master axis by means of a table (electronic camshaft). Here the table contains a certain number of prescribed reference points, and the NC interpolates position and speed between them.

FIFO axes extend the table concept for any number of sequences that do not usually recur cyclically. In this case, rather than having one master-slave table prescribed in advance, the latest axis positions are constantly "topped up" by a PLC program. Because the FIFO axes are combined into a FIFO group, synchronised axis motions can be implemented.

The TwinCAT PLC library TcNcFifoAxis.lib, available as an additional product, provides easy management of FIFO axes. An example program using FIFO axes makes use of this library.


FiFoGetDimension

FiFoGetDimension determines the dimensioning, i.e. the number of the axes and the maximum number of FIFO entries in a FIFO channel.

Interface

VAR_INPUT
    iChannelId  : UDINT;
    bExecute    : BOOL;
    tTimeout    : TIME;
END_VAR
VAR_OUTPUT
    bBusy            : BOOL;
    bErr             : BOOL;
    iErrId           : UDINT;
    iNoOfAxes        : UDINT;
    iNoOfFifoEntries : UDINT;
END_VAR

iChannelId: Channel ID of the FIFO channel.

bExecute: Edge-triggered signal for execution of the command.

tTimeout: ADS timeout (about 1 second).

bBusy: Becomes TRUE with a rising edge at bExecute, and remains TRUE until the block has executed the command.

bErr: Becomes TRUE if an error occurs while executing the command.

bErrId: Error number (ADS or NC error number).

iNoOfAxes: Number of axes for which the FIFO channel has been parameterised.

iNoOfFifoEntries: Number of FIFO entries for which the FIFO channel has been parameterised.


FiFoGroupIntegrate

FiFoGroupIntegrate integrates an initially independent PTP axis into a FIFO channel. iGroupPosition specifies the logical sequence, and indicates the position within the channel at which the axis is to be inserted.

Interface

VAR_INPUT
    iChannelId      : UDINT;
    iAxisId         : UDINT; (* [1..n] *)
    iGroupPosition  : UDINT; (* [1..m] *)
    bExecute        : BOOL;
    tTimeout        : TIME;
END_VAR
VAR_OUTPUT
    bBusy    : BOOL;
    bErr     : BOOL;
    iErrId   : UDINT;
END_VAR

iChannelId: Channel ID of the FIFO channel.

iAxisId: Axis ID of an axis that is to be inserted into the FIFO channel.

iGroupPosition: Position of the axis within the FIFO channel (iGroupPosition>=1).

bExecute: Edge-triggered signal for execution of the command.

tTimeout: ADS timeout (about 1 second).

bBusy: Becomes TRUE with a rising edge at bExecute, and remains TRUE until the block has executed the command.

bErr: Becomes TRUE if an error occurs while executing the command.

bErrId: Error number (ADS or NC error number).


FiFoGroupDisintegrate

FiFoGroupDisintegrate dismantles a FIFO channel. This means that all the axes are removed from the FIFO channel and are placed in the standard PTP channel as independent PTP axes.

Interface

VAR_INPUT
    iChannelId  : UDINT;
    bExecute    : BOOL;
    tTimeout    : TIME;
END_VAR
VAR_OUTPUT
    bBusy       : BOOL;
    bErr        : BOOL;
    iErrId      : UDINT;
END_VAR

iChannelId: Channel ID of the FIFO channel.

bExecute: Edge-triggered signal for execution of the command.

tTimeout: ADS timeout (about 1 second).

bBusy: Becomes TRUE with a rising edge at bExecute, and remains TRUE until the block has executed the command.

bErr: Becomes TRUE if an error occurs while executing the command.

bErrId: Error number (ADS or NC error number).


FiFoWrite

FiFoWrite reads position data for iColDim FIFO channel axes from AdrDataArray and transfers iRowsToWrite entries to the FIFO.

Interface

VAR_INPUT
    iChannelId    : UDINT;
    AdrDataArray  : POINTER TO LREAL; (* PLC: ARRAY[ ROWS, COLUMNS ] OF LREAL *)
    iColDim       : UDINT; (* second array dimension (COLUMNS) *)
    iRowsToWrite  : UDINT; (* number of rows to write <= RowDim *)
    bExecute      : BOOL;
    tTimeout      : TIME;
END_VAR
VAR_OUTPUT
    bBusy   : BOOL;
    bErr    : BOOL;
    iErrId  : UDINT;
END_VAR

iChannelId: Channel ID of the FIFO channel.

AdrDataArray: The address of a data field containing position data for the master and slave axes. The first of the field's dimensions describes the table lines, and the second dimension describes the columns.

iColDim: Number of columns in the data field. This value must correspond to the actual size of the second field dimension.

iRowsToWrite: Number of table lines. This value may be less than or equal to the size of the first field dimension.

bExecute: Edge-triggered signal for execution of the command.

tTimeout: ADS timeout (about 1 second).

bBusy: Becomes TRUE with a rising edge at bExecute, and remains TRUE until the block has executed the command.

bErr: Becomes TRUE if an error occurs while executing the command.

bErrId: Error number (ADS or NC error number).


FiFoWrite

TS5060 | TwinCAT NC FIFO Axes

FiFoOverwrite

FiFoWrite reads position data for iColDim FIFO channel axes from AdrDataArray and transfers iRowsToWrite entries to the FIFO. Existing FIFO data will be overwritten.

Interface

VAR_INPUT
    iChannelId    : UDINT;
    AdrDataArray  : POINTER TO LREAL; (* PLC: ARRAY[ ROWS, COLUMNS ] OF LREAL *)
    iColDim       : UDINT; (* second array dimension (COLUMNS) *)
    iRowsToWrite  : UDINT; (* number of rows to write <= RowDim *)
    bExecute      : BOOL;
    tTimeout      : TIME;
END_VAR
VAR_OUTPUT
    bBusy   : BOOL;
    bErr    : BOOL;
    iErrId  : UDINT;
END_VAR

iChannelId: Channel ID of the FIFO channel.

AdrDataArray: The address of a data field containing position data for the master and slave axes. The first of the field's dimensions describes the table lines, and the second dimension describes the columns.

iColDim: Number of columns in the data field. This value must correspond to the actual size of the second field dimension.

iRowsToWrite: Number of table lines. This value may be less than or equal to the size of the first field dimension.

bExecute: Edge-triggered signal for execution of the command.

tTimeout: ADS timeout (about 1 second).

bBusy: Becomes TRUE with a rising edge at bExecute, and remains TRUE until the block has executed the command.

bErr: Becomes TRUE if an error occurs while executing the command.

bErrId: Error number (ADS or NC error number).


FiFoStart

FiFoStart initiates processing of the FIFO channel, so that all the axes in the FIFO channel are driven in accordance with the position data previously provided to the FIFO.

Interface

VAR_INPUT
    iChannelId  : UDINT;
    bExecute    : BOOL;
    tTimeout    : TIME;
END_VAR
VAR_OUTPUT
    bBusy   : BOOL;
    bErr    : BOOL;
    iErrId  : UDINT;
END_VAR

iChannelId: Channel ID of the FIFO channel.

bExecute: Edge-triggered signal for execution of the command.

tTimeout: ADS timeout (about 1 second).

bBusy: Becomes TRUE with a rising edge at bExecute, and remains TRUE until the block has executed the command.

bErr: Becomes TRUE if an error occurs while executing the command.

bErrId: Error number (ADS or NC error number).


FiFoStop

FiFoStop halts a FIFO channel. Processing of the position data from the FIFO stops, and all the axes in the FIFO channel are halted.

Interface

VAR_INPUT
    iChannelId  : UDINT;
    bExecute    : BOOL;
    tTimeout    : TIME;
END_VAR
VAR_OUTPUT
    bBusy    : BOOL;
    bErr     : BOOL;
    iErrId   : UDINT;
END_VAR

iChannelId: Channel ID of the FIFO channel.

bExecute: Edge-triggered signal for execution of the command.

tTimeout: ADS timeout (about 1 second).

bBusy: Becomes TRUE with a rising edge at bExecute, and remains TRUE until the block has executed the command.

bErr: Becomes TRUE if an error occurs while executing the command.

bErrId: Error number (ADS or NC error number).


FiFoSetChannelOverride

FiFoSetChannelOverride sets the channel override by means of which the processing speed of the FIFO channel can be affected. The channel override should not be confused with the axis overrides for the individual axes.

Interface

VAR_INPUT
    iChannelId  : UDINT;
    iOverride   : UDINT;
    bExecute    : BOOL;
    tTimeout    : TIME;
END_VAR
VAR_OUTPUT
    bBusy   : BOOL;
    bErr    : BOOL;
    iErrId  : UDINT;
END_VAR

iChannelId: Channel ID of the FIFO channel.

iOverride: Channel override for the speed of the FIFO channel.

bExecute: Edge-triggered signal for execution of the command.

tTimeout: ADS timeout (about 1 second).

bBusy: Becomes TRUE with a rising edge at bExecute, and remains TRUE until the block has executed the command.

bErr: Becomes TRUE if an error occurs while executing the command.

bErrId: Error number (ADS or NC error number).


Get_TcNcFifoAxis_Version

Get_TcNcFifoAxis_Version determines the version number of the PLC library TcNcFifoAxis.lib. The function returns the version number in a string.

Interface

FUNCTION Get_TcNcFifoAxis_Version : STRING(20)
VAR_INPUT
    bGet : BOOL;
END_VAR

bGet: Signal for execution of the command.