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

The TwinCAT NC FIFO group provides the facility of supplying externally generated set values to a group of axes via the NC, and thus of driving them synchronously. The set values for the positions of the axes corresponding to a fixed, although selectable, time period (the FIFO cycle time) are present in the form of a FIFO which is kept topped up by the PLC. The FIFO allows the position of a group of axes to be handled synchronously with reference to time. The FIFO contains a fixed number of prescribed reference points, while the NC interpolates position between them and determines the speed. The FIFO's axis positions are

  • either read out of a large table located in the PLC and calculated offline, or
  • calculated by a function in the PLC

and continuously passed in each PLC cycle by a PLC program to the NC's FIFO.

Interfaces and Configuration

The user can parameterise the FIFO group via the System Manager or the PLC, and can manipulate the functionality of the FIFO group by means of PLC blocks. He also has available (in the System Manager and through the PLC) a cyclic NC-PLC channel interface. This contains the channel process image, and permits access to a variety of channel variables. Finally, he also has available (in the System Manager and through the PLC) a cyclic NC-PLC axis interface. This contains the axis process image for each FIFO axis, and permits access to a variety of axis variables.

FIFO Parameters and the FIFO

The FIFO group is parameterised by a number of data items. These must be set by the user:

  • FIFO dimension N = number of FIFO axes,
  • FIFO length Z = number of FIFO lines,
  • FIFO cycle time T_f = cycle time for which the FIFO data was generated.

The FIFO is a table, T[Z][N], with N columns and Z lines. These lines are cyclically refilled after they have been used. At position T[T][A] the FIFO contains the set position value for axis A at time T × T_f (T_f FIFO cycle time).

Sequence and the Generation of Set Values

  1. Preparation phase: Group FIFO and parameterise.
  2. Fill FIFO and run FIFO group.
  3. Prepare FIFO data and refill FIFO.

  4. Stop and reconfigure group.

The generation of set values includes the set position, set speed, set acceleration and the set direction.

Override

The override is used to apply a synchronous online percentage change to the speeds of all the FIFO axes prescribed by the FIFO. There are two logical data channels:

  • Instantaneous override changes the override instantaneously to the desired value. This means that it is up to the user to modify the override slowly enough that excessive following errors do not result from the change in override.
  • The PT-2 override, which can be parameterised, and which uses a PT-2 transfer function to modify the override continuously towards the desired speed according to the difference from the current speed.


Interfaces and Configuration

The user can parameterise the FIFO group via the System Manager or the PLC, and can manipulate the functionality of the FIFO group by means of PLC blocks. He also has available (in the System Manager and through the PLC) a cyclic NC-PLC channel interface. This contains the channel process image, and permits access to a variety of channel variables. Finally, he also has available (in the System Manager and through the PLC) a cyclic NC-PLC axis interface. This contains the axis process image for each FIFO axis, and permits access to a variety of axis variables.

Configuration of the FIFO Group with the System Manager

Create the FIFO Channel

A FIFO channel must first be created in the System Manager. The method for inserting a channel is described in the System Manager documentation under NC Configuration.

Parameterise the FIFO Group

A description of the parameters can be found on the FIFO Parameters and the FIFO page.

Group Axes

All the system's axes are always initialised as PTP axes. Once the steps described above have been carried out, and the parameters have been saved and entered into the registry, the axes can be moved to their base positions. It is important to note that the position must be compatible with the 1st line in the FIFO.

PLC blocks are then used to determine the FIFO group. In other words, selected PTP axes are included in the FIFO group.

PLC Blocks

The PLC library offers access to all the FIFO group's functionality:

  • Configuration and reconfiguration between PTP axes and FIFO group.
  • Filling the FIFO, running the group, refilling the FIFO.

NC-PLC-Interface

The cyclic NC-PLC channel interface contains the channel process image and, in particular, access to the channel variables.

The cyclic NC-PLC axis interface contains the axis process image and access to the axis variables.


FIFO Parameters and the FIFO

The FIFO group is parameterised with the aid of the System Manager, although this can also be partially carried out via ADS, i.e. using the PLC.

Parameterisation of the FIFO Group

The FIFO group is parameterised by a number of data items. These must be set by the user:

  • FIFO dimension N = number of FIFO axes,
  • FIFO length Z = number of FIFO lines,
  • FIFO cycle time T_f (the timebase of the FIFO entries) = cycle time for which the FIFO data was generated.
  • FIFO-Override

The FIFO is a table, T[Z][N], with N columns and Z lines. These lines are cyclically refilled after they have been used. At position T[T][A] the FIFO contains the set position value for axis A at time T × T_f (T_f FIFO cycle time).

FIFO Timing and Size

The timing of the data generation in the PLC (the PLC cycle time), of the ADS transfer via PLC (the PLC cycle time and the size of the PLC's internal data buffer), the usage of the FIFO contents (SAF cycle time) and the length of the FIFO, N must be set up and adapted to one another in such a way that

  • the FIFO does not run dry,
  • the FIFO (as a rule) can accept the data offered by the PLC.

FIFO Cycle Time

The statement execution time constant (known as the SAF cycle time, T_saf) does not have to be identical to the time constant for which the FIFO was designed or generated (the FIFO cycle time, T_f).

T_f > T_saf:

If the FIFO cycle time is bigger than the SAF cycle time, then a fine interpolation is in operation, so that the necessary intermediate values for the position control may in some cases be linearly interpolated a number of times from the same pair of neighbouring reference points in the FIFO. The acceleration and the speed have correspondingly coarse resolutions, and should not be used in unfiltered form as input magnitudes.

T_f < T_saf:

If on the other hand the FIFO cycle time is smaller than the SAF cycle time, then coarse interpolation is in action. In such cases, a portion of the FIFO information remains unused.

Table of FIFO Parameters

FIFO parameter | Meaning and boundary conditions
FIFO dimension N | Number of FIFO axes 1 ≤ N
FIFO lines Z | Number of FIFO lines 2 ≤ Z
FIFO cycle time T_f | FIFO cycle time 0.0 < T_f


Sequence and the Generation of Set Values

  1. Preparation phase: Group FIFO and parameterise.
  2. Fill FIFO and run FIFO group.
  3. Prepare FIFO data and refill FIFO.

  4. Stop and reconfigure group.

The generation of set values includes the set position, set speed, set acceleration and the set direction.

Preparation phase

  1. All the axes are moved to a base position in PTP mode (which must be compatible with the first line in the FIFO).
  2. Create the FIFO Channel: interpreter channel without interpreter.
  3. Create the FIFO group: the axes are collected into the FIFO group.

  4. Parameterise the FIFO group.

Start Phase

  1. The FIFO is filled with data as far as possible.
  2. Set the FIFO override.
  3. Run the FIFO group.

Running Phase

  1. Data for the FIFO is provided in the PLC by the user or is generated, and is collected in a buffer internal to the PLC.
  2. PLC cycles transfer this data to the FIFO in the NC. If the FIFO is too full to accept the whole of the buffer's contents, the whole buffer is refused, and the PLC must offer it again. To assist optimisation of the timing it is possible for the number of filled lines in the FIFO to be interrogated.
  3. The NC works through the FIFO entries in SAF cycles. If the FIFO is empty the axes retain the set position values of the last FIFO line (which causes a following error if the axes were not at that stage stationary).

  4. For all the axes, the FIFO generator must provide: the set position, set speed, set acceleration and set direction.

End Phase

  1. The positioning process normally ends by the contents of the FIFO bringing the axes to a halt followed by a stationary interval.
  2. The axes can be stopped by a FIFO override of 0.0.
  3. The FIFO can run dry, bringing the axes to an instantaneous halt.
  4. After being stopped, the axes in the FIFO group can be reconfigured as PTP axes.

Set value generation

When working in sequence through the FIFO entries, the set value generation process determines not only the set position, but also the set speed and the set acceleration for an axis. The set speed is generally used as a speed pre-control, as in TwinCAT PTP.

With every SAF call, the FIFO generator seeks the nearest pair of lines according to the elapsed time (taking the override into account), performs a linear interpolation of the position, and calculates the speed and acceleration from the differences. There are known faults in this method of calculating the set values from differences: the magnitudes should not therefore be used as input values without some examination.

Process flow with two FIFO axes (positions and speeds, set and actual values) and the quantity of data in the FIFO (red).


Override

The override is used to apply a synchronous online percentage change to the speeds of all the FIFO axes prescribed by the FIFO. There are two logical data channels:

  • Instantaneous override changes the override instantaneously to the desired value. This means that it is up to the user to modify the override slowly enough that excessive following errors do not result from the change in override.
  • The PT-2 override, which can be parameterised, and which uses a PT-2 transfer function to modify the override continuously towards the desired speed according to the difference from the current speed.

General Notes

The override can be set right at the beginning.

The axes can be stopped through setting override 0.0.

After such a stop, further changes to the override will no longer be accepted.

Instantaneous override

The instantaneous override alters the speed immediately to the desired value. Since a very sudden change in speed is normally undesirable, the user is responsible for ensuring that the override changes appropriately with time (controlled adjustment).

Instantaneous override

PT-2 Override

The PT2 override changes the speed continuously according to the difference between the current speed level and the desired speed level. The progress of this modification is specified by these external and internal parameters

  • Discriminate (damping) > 1.0 [ is specified as 1.001]
  • Time constant T_0 0.0 < T_0 < ∞ [freely selectable]
  • Cutoff, which completes the exponentially gradual decay of an alteration in a finite time [is parameterised internally by means of the reference speeds of the FIFO axes].

PT2-Override

PT-2 Override Time Constant

The time constant T_0 specifies the speed of the level change.

PT2 parameterisation: time constant T_0