Beckhoff TwinCAT 2 User manual

Manual | EN
TS5055
TwinCAT 2 | NC Flying Saw
2022-11-22 | Version: 1.3


Table of contents
TS5055 3Version: 1.3
Table of contents
1 Foreword....................................................................................................................................................5
1.1 Notes on the documentation .............................................................................................................5
1.2 Safety instructions.............................................................................................................................6
1.3 Notes on information security............................................................................................................7
2 General.......................................................................................................................................................8
3 Synchronisation to velocity ...................................................................................................................11
4 Synchronisation to position...................................................................................................................15
5 Parameterisable boundary conditions, specifying the mode of operation ....................................... 18
6 Characteristic values ..............................................................................................................................21
7 Calculating the synchronisation phase ................................................................................................23
8 Reversal of the master axis movement / reverse motion stop ...........................................................25
9 Diagonal saw ...........................................................................................................................................29
10 Interfaces .................................................................................................................................................30
11 Operation from the System Manager ....................................................................................................32
12 PLC API ....................................................................................................................................................33
12.1 TcMC2_FlyingSaw ..........................................................................................................................33
12.1.1 MC_GearInVelo ...............................................................................................................33
12.1.2 MC_GearInPos ................................................................................................................36
12.1.3 MC_ReadFlyingSawCharacteristics................................................................................. 39
12.2 TcMC2.............................................................................................................................................40
12.2.1 MC_GearOut.................................................................................................................... 40
12.3 Data types .......................................................................................................................................41
12.3.1 ST_SyncMode.................................................................................................................. 41
12.3.2 MC_FlyingSawCharacValues ..........................................................................................42
12.4 Example program............................................................................................................................44
12.4.1 Flying saw sample program .............................................................................................44
13 Error situations and error codes: ..........................................................................................................45

Table of contents
TS50554 Version: 1.3

Foreword
TS5055 5Version: 1.3
1 Foreword
1.1 Notes on the documentation
This description is only intended for the use of trained specialists in control and automation engineering who
are familiar with applicable national standards.
It is essential that the documentation and the following notes and explanations are followed when installing
and commissioning the components.
It is the duty of the technical personnel to use the documentation published at the respective time of each
installation and commissioning.
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.
We reserve the right to revise and change the documentation at any time and without prior announcement.
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®, TwinCAT/BSD®, TC/BSD®, EtherCAT®, EtherCAT G®, EtherCAT G10®, EtherCAT P®,
Safety over EtherCAT®, TwinSAFE®, XFC®, XTS® and XPlanar® 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 EtherCAT Technology is covered, including but not limited to the following patent applications and
patents:
EP1590927, EP1789857, EP1456722, EP2137893, DE102015105702
with corresponding applications or registrations in various other countries.
EtherCAT® is a registered trademark and patented technology, licensed by Beckhoff Automation GmbH,
Germany
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.

Foreword
TS50556 Version: 1.3
1.2 Safety instructions
Safety regulations
Please note the following safety instructions and explanations!
Product-specific safety instructions can be found on following pages or in the areas mounting, wiring,
commissioning etc.
Exclusion of liability
All the components are supplied in particular hardware and software configurations appropriate for the
application. Modifications to hardware or software configurations other than those described in the
documentation are not permitted, and nullify the liability of Beckhoff Automation GmbH & Co. KG.
Personnel qualification
This description is only intended for trained specialists in control, automation and drive engineering who are
familiar with the applicable national standards.
Description of symbols
In this documentation the following symbols are used with an accompanying safety instruction or note. The
safety instructions must be read carefully and followed without fail!
DANGER
Serious risk of injury!
Failure to follow the safety instructions associated with this symbol directly endangers the life and health of
persons.
WARNING
Risk of injury!
Failure to follow the safety instructions associated with this symbol endangers the life and health of per-
sons.
CAUTION
Personal injuries!
Failure to follow the safety instructions associated with this symbol can lead to injuries to persons.
NOTE
Damage to the environment or devices
Failure to follow the instructions associated with this symbol can lead to damage to the environment or
equipment.
Tip or pointer
This symbol indicates information that contributes to better understanding.

Foreword
TS5055 7Version: 1.3
1.3 Notes on information security
The products of Beckhoff Automation GmbH & Co. KG (Beckhoff), insofar as they can be accessed online,
are equipped with security functions that support the secure operation of plants, systems, machines and
networks. Despite the security functions, the creation, implementation and constant updating of a holistic
security concept for the operation are necessary to protect the respective plant, system, machine and
networks against cyber threats. The products sold by Beckhoff are only part of the overall security concept.
The customer is responsible for preventing unauthorized access by third parties to its equipment, systems,
machines and networks. The latter should be connected to the corporate network or the Internet only if
appropriate protective measures have been set up.
In addition, the recommendations from Beckhoff regarding appropriate protective measures should be
observed. Further information regarding information security and industrial security can be found in our
https://www.beckhoff.com/secguide.
Beckhoff products and solutions undergo continuous further development. This also applies to security
functions. In light of this continuous further development, Beckhoff expressly recommends that the products
are kept up to date at all times and that updates are installed for the products once they have been made
available. Using outdated or unsupported product versions can increase the risk of cyber threats.
To stay informed about information security for Beckhoff products, subscribe to the RSS feed at https://
www.beckhoff.com/secinfo.

General
TS50558 Version: 1.3
2 General
The Flying Saw is a slave axis that can be synchronized to a moving master axis. The slave axis moves in
synchronism with the master axis to perform machining processes. This kind of movement, synchronized to
the master axis, means that a workpiece can be machined even while it is being transported.
An important difference between the "Flying Saw" and the "Universal Flying Saw" is associated with the
initial conditions required of the slave axis for the synchronization. The "Universal Flying Saw", unlike the
"Flying Saw", is able to start synchronization of the slave even when the slave has already started, and is
therefore no longer stationary. The "Universal Flying Saw" also calculates improved set value profiles, and
these can be influenced by the user through a wide range of boundary conditions.
The ratio of the master velocity to the slave velocity in the synchronous phase is parameterized via a
variable coupling factor. This coupling factor in the case of a diagonal saw, for instance, is chosen to be
unequal to 1, so that the velocity component of the slave axis in the direction of the master axis movement
(vslave parallel to Vmaster) in the synchronized phase is equal to the master velocity (vmaster). (See diagram.)
The Universal Flying Saw basically provides two different synchronization methods. In the case of
synchronization to velocity the slave is synchronized to the master as quickly as possible, bearing in mind
the coupling factor. The coupling position for the master and slave axes therefore results from having set the
fastest possible synchronization as the target. In contrast to this, the coupling position of the master and
slave axes is parameterized by the user under synchronization to position. The master and slave movements
will in this case therefore be moving in synchronization as from the specified position at the latest.
Both of these synchronization methods permit a variety of boundary conditions to be specified for the
synchronization phase. These boundary conditions make it possible to adapt the synchronization process to
the needs of the machine.
This manual describes the Universal Flying Saw TcMc2_FlyingSaw.lib, which is available from
TwinCAT Version 2.9, Build 248. If you are using the previous version TcNcFlyingSaw.lib and need
further information, see here.
Interfaces
The Universal Flying Saw is operated and monitored from the PLC using appropriate function blocks. For
commissioning purposes, however, the Universal Flying Saw can also be started directly from the TwinCAT
System Manager [}32]. In this case, the cyclic NC/PLC axis interface and ADS communication are used as
the underlying interface.

General
TS5055 9Version: 1.3
Synchronisation to velocity
In Synchronisation to velocity [}11] the slave axis is synchronised to the master axis using the specified
dynamic parameters as rapidly as possible. In the synchronous phase, the slave velocity is proportional to
the master velocity, so that:
The synchronisation procedure
Synchronisation of the slave axis to the master axis proceeds according to the following scheme:
1. Starting the Universal Flying Saw. This corresponds to the logical coupling to the master axis. This
moment is referred to as the coupling time.
2. The synchronisation phase: The slave is accelerated from its initial condition up to the velocity of the
master whilst observing the boundary conditions for slave movement specified by the user. The time
at which the synchronisation phase changes to the synchronous phase is referred to as the synchroni-
sation time.
3. Synchronous phase: The slave moves synchronously with the master.
4. Uncoupling the Universal Flying Saw. This is an online change. The coupled slave once again be-
comes an independent master that continues to move without limit with the velocity resulting from the
online change.
5. This could mean that the former slave restarts or stops. The full functionality of a TwinCAT NC master
axis is once more available.
Synchronisation to position
In Synchronisation to position [}15] the slave axis is synchronised to the master at the specified
synchronisation position using the specified dynamic parameters. This means that the slave axis reaches the
synchronous velocity at exactly the synchronisation position of master and slave, after which it moves in
synchronism with the master. The slave velocity in the synchronous phase is governed by:
The synchronisation procedure
Synchronisation of the slave axis to the master axis proceeds according to the following scheme:
1. The start of the Universal Flying Saw. This is the logical coupling to the master axis. This moment is
referred to as the coupling time.
2. The synchronisation phase: The slave is accelerated from its initial condition to the master's velocity,
reaching the slave synchronisation position and synchronisation velocity precisely at the specified
master synchronisation position. The boundary conditions specified by the user for slave movement
are maintained during this process. The time at which the synchronisation phase changes to the syn-
chronous phase is referred to as the synchronisation time.
3. Synchronous phase: The slave moves synchronously with the master.
4. Uncoupling the Universal Flying Saw. This is an online change. The coupled slave once again be-
comes an independent master that continues to move without limit with the velocity resulting from the
online change.
5. This could mean that the former slave restarts or stops. The full functionality of a TwinCAT NC master
axis is once more available.

General
TS505510 Version: 1.3
Parameterisable boundary conditions governing synchronisation
In principle, any initial conditions may apply to the calculation of the synchronisation profile for the master
and slave axes.
The transition of the slave's movement from its initial state to the synchronous state is calculated in such a
way that boundary conditions [}18] that can be specified by the user and that govern the slave's
movement are maintained. These boundary conditions can be used, for instance, to limit the maximum slave
velocity, or to prevent an overshoot in its position.
The calculation and checking of the parameterisable boundary conditions proceeds on the basis of the
characteristic values determined for the synchronisation phase. In the determination of the characteristic
values, the idealised assumption is made that the master axis will continue to move at a constant velocity,
i.e. with no acceleration, after the coupling time. Exact calculation and checking of the parameterisable
boundary conditions is only possible if this assumption is made. Any other reasonable assumption about the
future movement of the master is not possible, since the master's future movement is not known at the time
of coupling.
An acceleration of the master that might occur in the future will also affect the slave dynamics as a result of
the coupling. Such acceleration by the master will have the effect that the calculated and checked values
may be overshot or undershot in some cases, depending on the master's acceleration. Characteristic values
that may be affected by master acceleration can be seen in the tabular description of the characteristic values
[}21].
Characteristic values describing slave movement
The characteristic values [}21] governing the movement that the slave will undergo during the
synchronisation phase are available to the user after the Universal Flying Saw has been started. This value
structure contains magnitudes such as the maximum slave acceleration, the minimum and maximum slave
position, and so forth. These values are calculated under the assumption that the master is free from
acceleration, and are therefore in some cases only exactly correct for such a case.
NOTE
The master acceleration at the time that the "Universal Flying Saw" starts has a significant effect on the
profile calculation and its optimization. This means that if an encoder axis is the master, the velocity and the
acceleration must be carefully filtered, or even the calculation of the actual acceleration must be deselected
(see. "Encoder mode").

Synchronisation to velocity
TS5055 11Version: 1.3
3 Synchronisation to velocity
Under synchronization to velocity, a slave axis, starting in any state, is synchronized as quickly as possible
to a moving master axis. The synchronous velocity of the slave here is given by the master velocity multiplied
by the coupling factor.
The synchronization phase of the slave axis is calculated in such a way that the boundary conditions [}18]
specified by the user are maintained. Calculation and checking of these boundary conditions is carried out
under the assumption that the master axis will continue to move without acceleration after the coupling time.
If the master axis is not free moving, some overshoot or undershoot of the parameterized boundary
conditions may occur.
Example 1:
In the illustrated phase 0 (left) the two axes are moving entirely independently. The future master axis is
accelerating to 500 mm/s while the future slave axis is accelerating to -250 mm/s. As the phase changes
from 0 to 2 the process of synchronization to velocity in the Universal Flying Saw starts (StartSync = 1) and
the set value profile for the synchronization is calculated. This calculated set value profile for the slave is
then specified for phase 2 of the slave axis. At the end of phase 2 the slave axis precisely achieves the
synchronous velocity, which is the velocity of the master axis multiplied by the coupling factor. From this time
on the axes are in the synchronous phase (phase 3). In this synchronous phase the two axes move
synchronously in accordance with the coupling factor. The synchronous phase is ended by the uncoupling
command. In the illustration, this corresponds to the transition from phase 3 to phase 0. From this time on
they are again two independent master axes. The slave axis changes to a master axis online at the
uncoupling time. This online change will remove any acceleration or deceleration to which the slave may be
subject, thus fixing the velocity of the former slave, with which it will then continue to move without limit.
The phase currently applying to the slave axis can be seen in the nAxisState variable in the cyclic axis
interface. (The names of the individual phases in the illustrations do not agree with the values of the
nAxisState [}30] variable.)
(*Start parameters*)
fMasterVelo:=500;
fSlaveVelo:=-250;
(*Couplingparameters*)
fGearRatio:=1.0;
fSlaveAcc:=2500;
fSlaveDec:=2500;
fSlaveJerk:=5000;

Synchronisation to velocity
TS505512 Version: 1.3
Example 2:
As example 1, but with coupling factor 1.5.
(*Start parameters*)
fMasterVelo:=500;
fSlaveVelo:=-250;
(*Couplingparameters*)
fGearRatio:=1.5;
fSlaveAcc:=2500;
fSlaveDec:=2500;
fSlaveJerk:=5000;

Synchronisation to velocity
TS5055 13Version: 1.3
Example 3:
The start of the coupling in the acceleration phase of the future slave.
(*Start parameters*)
fMasterVelo:=-500;
fSlaveVelo:=400;
(*Couplingparameters*)
fGearRatio:=1;
fSlaveAcc:=2500;
fSlaveDec:=2500;
fSlaveJerk:=5000;

Synchronisation to velocity
TS505514 Version: 1.3
PLC function blocks
The function block MC_GearInVelo is used for the coupling. To end the synchronous phase by uncoupling
(online change) the function block MC_GearOut is used.

Synchronisation to position
TS5055 15Version: 1.3
4 Synchronisation to position
In the case of synchronisation to position, the slave axis, starting from its initial state, is synchronised to the
master axis in such a way that the required synchronous velocity (vmaster·= coupling factor) and
synchronisation position are achieved precisely at the master's synchronisation position.
The synchronisation phase of the slave axis is calculated in such a way that the boundary conditions [}18]
specified by the user are maintained. Calculation and checking of these boundary conditions is carried out
under the assumption that the master axis will continue to move without acceleration after the coupling time.
If the master axis is not free moving, some overshoot or undershoot of the parameterised boundary
conditions may occur.
Example 1:
In the example illustrated, the future master and slave axes are independently started, moving in positive
directions. At the time of the illustrated phase change from 0 to 2, the Universal Flying Saw is started with
synchronisation to position (StartSync = 1). Synchronisation to position means that the slave axis reaches
the synchronous velocity precisely as the master is at the master synchronisation position (master-sync-
position) and when the slave is at the slave synchronisation position (slave-sync-position). The synchronous
velocity corresponds to the master velocity multiplied by the chosen coupling factor. In the example
illustrated here, the master-sync-position is identical to the slave-sync-position, which means that the master
and slave positions are the same when the InSync signal provides a rising edge. In this example, 1 has been
selected as the coupling factor, so that the master and slave velocities in the synchronous phase (3) are
identical. At the time when the phase changes from 3 to 0, the slave axis is uncoupled from the master axis
(online change), and then continues to move once again as an independent master axis. The slave axis
changes to a master axis online at the uncoupling time. This online change will remove any acceleration or
deceleration to which the slave may be subject, thus fixing the velocity of the former slave, with which it will
then continue to move without limit.
The phase currently applying to the slave axis can be seen in the nAxisState variable in the cyclic axis
interface. (The names of the individual phases in the illustrations do not agree with the values of the
nAxisState [}30] variable.)
(*Start parameters*)
fMasterVelo:=500;
fSlaveVelo:=250;
fMasterStartPos:=-500;
fSlaveStartPos:=-250;
(*Couplingparameters*)
fGearRatio:=1;
fMasterSynchronPos:=1000;
fSlaveSynchronPos:=1000;
fSlaveAcc:=2500;
fSlaveDec:=2500;
fSlaveJerk:=5000;

Synchronisation to position
TS505516 Version: 1.3
Example 2:
(*Startparameters*)
fMasterVelo:=500;
fSlaveVelo:=-250;
fMasterStartPos:=-500;
fSlaveStartPos:=-500;
(*Couplingparameters*)
fGearRatio:=1.5;
fMasterSynchronPos:=1000;
fSlaveSynchronPos:=500;
fSlaveAcc:=10000;
fSlaveDec:=10000;
fSlaveJerk:=50000;

Synchronisation to position
TS5055 17Version: 1.3
PLC function blocks
The function block MC_GearInPos is used for coupling. To end the synchronous phase, i.e. for uncoupling
(online change of the slave into an independent master), the function block MC_GearOut is used.

Parameterisable boundary conditions, specifying the mode of operation
TS505518 Version: 1.3
5 Parameterisable boundary conditions,
specifying the mode of operation
It is possible to specify a wide variety of boundary conditions for the slave movement in the synchronization
phase of the Universal Flying Saw. These boundary conditions make it possible to specify limit values for the
slave magnitudes listed in the table below. The SyncMode bit mask can be used to check whether the
individual limit values are being observed. The boundary conditions specified for the synchronization phase
also affect the set value profile for the synchronization. Whether, and in what way, the conditions affect the
profile can be seen in the diagram [}23] in the chapter below.
Synchronization mode Description
Define:
GeaInSyncMode
GEARINSYNCMODE_POSITIONBASED In this mode of the universal flying saw,
a profile dependent on the master
position is generated to synchronize the
slave axis to the master axis.
GEARINSYNCMODE_TIMEBASED In this mode of the universal flying saw,
a time-dependent motion profile is
generated for synchronizing the slave
axis to the master axis, which ensures
compliance with all dynamic limit values
of the slave axis. This mode is currently
only available with coupling on velocity.
Bit masks for the "SyncMode" Description Boundary
condition
Define:
GEARINSYNC_CH
ECKMASK_
Value
Decimal
Value
Hexadecimal
MINPOS 1 0x0000 0001 Checks whether
the slave axis has
passed below its
software minimum
end position
(machine data).
posSlave ≥ posSlaveMin
MAXPOS 2 0x0000 0002 Checks whether
the software
maximum end
position (machine
data) of the slave
axis has been
exceeded.
posSlave ≤ posSlaveMax
MAXVELO 4 0x0000 0004 Checks whether
the maximum
permitted slave
velocity (machine
data) has been
exceeded.
| vSlave | ≤ vSlaveMax
MAXACC 8 0x0000 0008 Checks whether
the maximum slave
acceleration
(machine data) has
been exceeded
accSlave ≤ accSlaveMax
MAXDEC 16 0x0000 0010 Checks whether
the maximum slave
deceleration
(machine data) has
been exceeded
decSlave ≤ decSlaveMax

Parameterisable boundary conditions, specifying the mode of operation
TS5055 19Version: 1.3
MAXJERK 32 0x0000 0020 Checks whether
the maximum slave
jerk (machine data)
has been
exceeded.
jSlave ≤ jSlaveMax
OVERSHOOTPOS 256 0x0000 0100 Checks for
overshooting of
slave position.
UNDERSHOOTPO
S
512 0x0000 0200 Checks for
undershooting of
slave position.´
OVERSHOOTVEL
O
1024 0x0000 0400 Checks for
overshooting of
slave acceleration.
UNDERSHOOTVE
LO
2048 0x0000 0800 Checks for
undershooting of
slave acceleration.
OVERSHOOTVEL
OZERO
4096 0x0000 1000 Checks whether
the slave velocity
has exceeded 0.0.
UNDERSHOOTVE
LOZERO
8192 0x0000 2000 Checks whether
the slave velocity is
below 0.0
Bit masks for operation modes
GEARINSYNC_OPMASK_
Description
ROLLBACKLOCK 65536 0x0001 0000 Bit = 0: (default)
When the slave has achieved the
synchronous phase, synchronous
coupling of all the following master
movements is maintained until the
coupling is removed. This also applies if
the master changes direction and
moves backwards over the coupling
position. (Further explanations) [}25]
Bit = 1:
Setting this bit activates the backstop,
which causes the slave to stop when
the master moves backwards beyond
the coupling position after a motion
reversal. (Further explanations) [}25]
INSTANTSTOPON
ROLLBACK
131072 0x0002 0000 Bit = 0: (default)
On reaching the coupling position, the
slave velocity is reduced smoothly
following a 5th order polynomial. The
polynomial is optimized to halt the slave
as quickly as possible. (Further
explanations) [}25]
Bit = 1:
In terms of the set value, the slave is
halted within one NC tick of reaching
the coupling position. The slave velocity
is set to 0.0 and the position is
maintained.
This abrupt stop can trigger the
following error monitoring system!
(Further explanations) [}25]

Parameterisable boundary conditions, specifying the mode of operation
TS505520 Version: 1.3
PREFERCONSTV
ELO
1048576 0x0010 0000 Bit = 0: (default)
Default setting
Bit = 1:
The system will try to use a phase with
constant velocity, instead of just one 5th
order polynomial. This can result in a
combination of a 5th-order polynomial,
a synchronous phase and another 5th-
order polynomial (P5-P1-P5), (see
further explanation) [}25]. The
maximum given acceleration and
deceleration is used. To control and
limit the jerk it is recommended to set
MAXJERK in the bit mask.
IGNOREMASTER
ACC
2097152 0x0020 0000 Bit = 0: (default)
Default setting
Bit = 1:
When calculating the coupling, the
acceleration of the master is ignored,
i.e. set to zero. This causes the use of
internal optimizations. At moderate
acceleration, this specification leads to
tolerable following errors. After the
following error has been reduced, the
relative position accuracy is
independent of this setting.
NOTE
The checks listed above apply only to the synchronization phase (GEARINSYNCSTATE_SYNCHRONIZ-
ING), not to the phase of synchronized movement. These calculations and checks are also only possible
when the assumption is made that the master continues to move with constant velocity after the coupling
time, i.e. that it is not subject to acceleration. Making other assumptions for the master makes no sense,
since at the time of coupling it is generally not known how the master will move in the future.
This manual suits for next models
2
Table of contents
Popular Saw manuals by other brands

Ronix
Ronix 4318 manual

WIDDER TOOLS
WIDDER TOOLS 10267 Product information and operating instructions

Flex
Flex RS 29 18.0 Original operating instructions

Hyundai
Hyundai HYMS1500E instruction manual

Stanley
Stanley STSC2135 Original instructions

CH Hanson
CH Hanson PALMGREEN 9683336 Operating instructions & parts manual