Twincat 3 - NC PTP
Twincat 3 - NC PTP
TF50x0
TwinCAT 3 | NC PTP
Table of contents
1 Foreword .................................................................................................................................................... 5
1.1 Notes on the documentation ............................................................................................................. 5
1.2 For your safety .................................................................................................................................. 6
1.3 Notes on information security............................................................................................................ 7
2 Overview .................................................................................................................................................... 8
6 Axes.......................................................................................................................................................... 19
6.1 Axis types ........................................................................................................................................ 19
6.1.1 Continuous axis................................................................................................................ 19
6.1.2 Encoder Axis .................................................................................................................... 19
6.1.3 Discrete Axis (two speed) ................................................................................................ 19
6.2 NC axis............................................................................................................................................ 20
6.2.1 Axis dialog box ................................................................................................................. 20
6.2.2 Axis component encoder.................................................................................................. 42
6.2.3 Axis component Drive ...................................................................................................... 55
6.2.4 Axis component cyclic interface ....................................................................................... 68
1 Foreword
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
Exclusion of liability
All the components are supplied in particular hardware and software configurations which are 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 technology who are
familiar with the applicable national standards.
Signal words
The signal words used in the documentation are classified below. In order to prevent injury and damage to
persons and property, read and follow the safety and warning notices.
DANGER
Hazard with high risk of death or serious injury.
WARNING
Hazard with medium risk of death or serious injury.
CAUTION
There is a low-risk hazard that could result in medium or minor injury.
NOTICE
The environment, equipment, or data may be damaged.
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.
2 Overview
TF5000 TwinCAT NC PTP is the basis for controlling simple axes up to complex multi-axis systems.
• TF5000: Up to 10 axes (extendable up to a maximum of 255 axes).
• TF5010: Extension of TF5000 to up to 25 axes (extendable to a maximum of 255 axes).
• TF5020: Extension of TF5000 to up to 255 axes.
Axis objects
The real axes are represented by axis objects. This results in a separation between physical and logical axis.
Rotatory and linear, electric and hydraulic drives can thus be programmed in the same way. In addition, the
axis object can simulate an axis. Initial program tests without physical hardware are thus possible. The
control of the axes can be configured in various conformations (position or velocity interface) and various
controllers. The axes are configured in TwinCAT Engineering.
• Supports electrical and hydraulic servo drives, frequency converter drives, stepper motor drives, DC
drives, switched drives (two-speed axes [} 149]), simulation axes and encoder axes [} 19].
• Supports various encoders such as incremental encoder, absolute encoder, digital interface to the
drives such as EtherCAT, SERCOS, SSI, Lightbus, PROFIBUS DP/MC, Pulse Train.
• Provides standard axis functions such as start, stop, reset, referencing, velocity override, master/slave
couplings, electronic gearing, online position compensation.
• Provides convenient methods for axis commissioning.
• Contains online monitors for all axis state variables, such as actual/setpoint values, enables, control
values, online axis tuning.
• Forcing of axis variables.
• Configuration of all axis parameters, such as measuring system, drive parameters and position
controller.
• Configurable controller structures: P control, PID control, PID with velocity pre-control, PID with velocity
and acceleration pre-control.
Programming
For programming, the Tc2_MC2 library provides PLCopen-compliant administrative and motion-initiating
function blocks. In addition to the pure movements of an axis from an initial position to a target position,
movements of two axes can also be operated in a gear coupling. This is referred to as gearing.
A coordinated master-slave motion with non-linear relationships is called cam plate coupling. These can be
added to the TwinCAT NC PTP by TF5050 | TwinCAT NC Camming.
TF5060 | TwinCAT NC FIFO AXES extends the TwinCAT NC PTP with a table coupling concept for arbitrary,
usually not cyclically recurring processes. 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.
Another addition to the axis coupling is TF5055 | TwinCAT Flying Saw. Here, a slave axis is coupled 'flying' to
a moving master axis at a specific position. As the name suggests, such couplings are often used when, for
example, a board needs to be cut with a saw on a moving conveyor belt.
• Programming is carried out via PLCopen-compliant IEC 61131-3 function blocks of the Tc2_MC2
library.
• Online master/slave and slave/master conversion
• "Flying Saw" (diagonal saw) with TF5055 | TwinCAT Flying Saw
• Cam plates with TF5050 | TwinCAT NC Camming
(supported by TwinCAT 3 CAM Design Editor [optional])
• FIFO axes with TF5060 | TwinCAT NC FIFO AXES
• External setpoint generators [} 144]
• Multi-master coupling
Further information
• PLC libraries
• ADS specification for NC
DANGER
Danger to life or risk of serious injury or damage to property due to unintentional
movements of the axis
When commissioning axes, there is a movement of them and the mechanics coupled to them, which
creates a hazard for people and a risk of damage to the machine. The following safety measures provide
guidelines for safe commissioning. The actual measures to be taken depend on the axis and its
surroundings.
As a general rule, "Don't take an action whose consequence you can't estimate."
Inform yourself about the safety instructions and commissioning steps of your drive, such as: AX8000 and
the NC safety functions [} 12] and use them.
Handling the emergency stop case is one of the most important and safety-relevant features of a machine.
For this reason it is usual for an additional hardware safety circuit to be built on top of all the logical (logical
axis enables) and software enables (PLC: controller and feed enables). Extensive statutory regulations exist
governing the reaction and the implementation in hardware of the emergency stop system. Here we only
make reference to these.
Within the limits prescribed by the statutory regulations, there remains often a degree of free choice as to
how, for instance, NC axes are stopped in the event of an emergency stop. In some cases the mechanical
properties of the machine mean that it is not always possible to bring axes that are moving to an abrupt halt
(e.g. abruptly output of 0.0 V of an analog interface). It is therefore quite common for NC axes to be slowed
following special braking ramps in an emergency stop situation, after which they are then electrically and
mechanically locked.
One of the first procedures for commissioning a machine is to test the emergency stop circuit. We begin
with safe, standard situations (the axes are stationary under emergency stop conditions, although special
attention must be paid here to axes that move vertically). The testing then moves on to more complicated
cases (axes moving slowly, then axes moving rapidly).
It is possible, in order to test and commission rapidly, to set the logical axis enables (controller and feed
enables) and the velocity override of the axes from the TwinCAT development environment via the Axis
online dialog [} 38] for the particular axis*. This is, however, only possible if the axis interface is not
involved in cyclical exchange with the PLC (mapping between the NC and PLC tasks). In that case, the
single write of information from the development environment would immediately be overwritten again by the
cyclic data exchange. It must, however, be pointed out that this procedure can be very dangerous, because
the usual safety monitoring and manipulation facilities of the PLC are disabled. Therefore, this feature can be
safely used on an axis test rig with endless axes.
*It is extremely inadvisable to use this facility on a real machine.
Essential requirements
The description below covers all the steps of commissioning an axis. Several types of axis and a range of
different situations are covered. In each step, all the settings which must be made are mentioned, even when
they are identical with the settings of the previous step. In practice, only some of the listed (partial) steps are
actually executed for an axis.
Before you can begin the commissioning itself, a number of preparations must be made:
• Check their completeness and correctness of all the electrical connections.
• All parts of the axis (encoder, drive, controller, PLC interface) must be of appropriate types, and must
be provided with the correct resources (PLC variables, I/O hardware in the fieldbus etc.).
• The NC architecture must not only be created, but must also be written into the registry, and TwinCAT
must be started with it.
Safety precautions
Sequence
It is necessary to observe a particular sequence, because the individual steps of axis commissioning are
built logically on each other. The sequence, however, does depend on the particular axis composition, i.e. on
the combination of the encoder, controller and drive types.
4 NC safety functions
A monitoring function (watchdog) is provided in order to monitor the operation and regular updating of the
cyclical interface between the PLC and the NC. In addition, there is task runtime overrun monitoring for each
task and position lag monitoring and end position monitoring for the NC axes.
NOTICE
No safety functions in the sense of safety technology
The NC safety functionalities are purely functional settings that are not safety functions in the sense of
safety technology.
The watchdog (function monitoring) functionality between the cyclic axis interface of the PLC and NC should
always be activated. This is the case if any value other than zero is entered for the watchdog. The value
specifies the number of sequential task cycles following which the watchdog will trigger if no new information
has been transferred between the NC and the PLC. If the watchdog is triggered, the corresponding axis
interface (PlcToNc or NcToPlc) is cleared, i.e. zeroed.
Example: When the watchdog is active, it is ensured in the following cases that the NC axes are stopped by
means of the removal of the controller and feed enable caused by the watchdog. When:
• the PLC is stopped
• an infinite loop has been programmed within the PLC
• an FPU exception occurs
For purposes of diagnosis and analysis the task time-out monitoring should be activated. This is true both for
the SAF task (I/O task of the NC) and for the SVB task of the NC. As regards content this monitoring has no
effect, but should there be an occasion where an unexpected task time-out occurs, the response is in the
form of a message box and an additional entry in the event display.
Right from the start of any operations each axis should be driven with both "position lag monitoring" and "end
position monitoring" active. Even if an axis that has not yet been optimized travels with sometimes very large
lag errors, these elementary monitoring mechanisms should not be switched off, but should be
parameterized accordingly (Position Lag Monitoring [} 29]).
Furthermore, there is the option of automatically checking the target position (Target Position Monitoring
[} 32]).
There are functionalities, e.g. position compensation on a master axis, which can cause an inversion of the
direction of movement. To avoid an unwanted direction of travel, there is a direction-dependent feed enable
that stops the axis instantaneously if it travels in the wrong direction.
Maximum velocity
Furthermore, there is the possibility to define the maximum allowed velocity of an axis in the axis parameters
or to limit the output of the drive in percent.
For example, it can happen that, by mistake, the direction of actuation of the axis control loop (positive
feedback) is altered as a result of changeover of drive or encoder polarity, and the axis, with full logical
consistency, drives towards the mechanical end position at maximum output value.
Stop
Notice The flying saw is the only slave axis that has a stop function. However, there are situations
when a flying saw cannot be stopped.
Slave axes can be stopped by disconnecting them online and converting them into master axes, which can
then be stopped. The FIFO axes and the NCI group can be stopped.
Hardware monitoring
It may be that a facility in an emergency situation (emergency stop, watchdog, etc.) must not be allowed
under any circumstances, for mechanical or other reasons, to halt abruptly its axes in the next I/O cycle (e.g.
to output 0 V suddenly). Such behavior can only be ensured via the drive hardware that is present. To this
end most manufacturers offer simple digital circuitry options that ensure that an axis is brought to a halt in a
defined way (braking ramp, standstill window for electrical deactivation of the control system and activation
of the brakes, etc.).
Task tab
The SAF task is configured via the NC/PTP NCI Configuration node below the MOTION node, which is
called NC-Task 1 SAF by default. Details about the task dialog can be found in the TE1000 | TwinCAT 3 XAE
documentation.
Settings tab
Retain data
TwinCAT-NC uses retain data to restore the position of individual axes with absolute measured value system
at system startup. The Retain setting determines globally whether data required for this purpose is saved
when the system is stopped and loaded when the system is started. In addition, the storage must be
parameterized for each axis that requires such data (see Data Persistence [} 37]).
NOTICE
Prevent data loss
If retain data is used, it is recommended that the system is backed up with a UPS so that the data can be
stored safely even if the supply voltage fails.
• Load (if available)/Store: Retain data is stored at system stop and loaded at system start. If there is no
data or only corrupt data at system startup, the system starts without retain data.
Axes that rely on retain data are in the "not referenced" state. The application should check this state
and take action.
Symbol Names
The setting Symbol Names, Language independent specifies that the generic part of the symbol name is not
changed. This is then always held in English.
For example, without this setting Axes.Axis 1.SetPos would change to Achsen.Axis 1.SetPos when switching
language from English to German, while with the setting it would remain English.
Online tab
The Online tab shows the utilization of the task over time and indicates the number of cycle time overruns.
Details can be found in the TE1000 | TwinCAT 3 XAE documentation.
In relation to the SAF task, a higher cycle time and a lower priority should be selected for the SVB task, as is
also the case by default.
5.3 Image
Under Image the process image of the SAF task is displayed.
General information on the process image of a task can be found in the documentation TE1000 | TwinCAT 3
XAE.
5.4 Tables
Electronic cam plates describe a nonlinear relationship between a master and a slave axis in a coupled axis
system.
Valve characteristic curves are required for the control of hydraulic axes. They describe a non-linear
relationship between the target velocity of an NC axis and the variable output to the controlled device.
Electronic cam plates and valve characteristic curves can be managed under Tables.
Further information:
• Motion Diagrams
TE1510 | TwinCAT 3 CAM Design Tool
TF5050 | TwinCAT 3 NC Camming
• Valve Diagrams
TE1500 | TwinCAT 3 Valve Diagram Editor
5.5 Objects
TwinCAT 3 has a modular structure.
The individual motion objects can be channel-dependent, e.g. axes in the axis channel or kinematic
transformations from the "NC Channel (for Kinematic Transformation)" or channel-independent.
The independent objects are managed via the Objects node. These are, for example, the Collision
Avoidance and Coordinated Motion groups.
6 Axes
The most important axis types are described below with their characteristics.
It is irrelevant in which form or with which hardware these specifications are ultimately made. This can be a
drive controller that follows continuous position or even continuous velocity setpoints. This group includes
digital servo drive controllers. But this can also be a hardware that follows an analog value.
An encoder axis can be used in the system as master of couplings, but never be slave.
A special feature of the encoder axis is that the setpoint corresponds to the actual value, since this axis type
does not have its own setpoint generator. If couplings are set up with an encoder axis, they are therefore
indirectly coupled to the actual value (couplings in the TwinCAT system are always setpoint-based).
This leads to the fact that a noise component is to be seen in the setpoint and is also transferred to slave
axes.
The TwinCAT axis type Two-Speed represents a special form of an axis. The following pages do not deal
with this TwinCAT axis type in particular, but assume a Continuous axis [} 19] or Encoder axis [} 19].
Detailed information for this special type can be found in the chapter Discrete Axis (two speed) [} 149] under
the special NC functionalities [} 141].
6.2 NC axis
6.2.1.1 General
Property Description
Name Selected name of the object.
Do not assign an object name more than once!
Object Id 32-bit identification number that is automatically assigned and unique within a
project.
Type Axis type [} 19]
The axis type is defined when the axis is created and cannot be changed later.
Comment Freely editable field for user notes.
Id Identification number of the axis, which is assigned consecutively. When an axis is
deleted, the number becomes free again and can be assigned to a new axis.
Disabled Option to disable an axis
Create symbols This option generates typical symbol names that are used in TwinCAT Scope, for
example.
6.2.1.2 Settings
In the Settings tab essential settings like linking the NC axis with hardware and PLC as well as type and unit
can be made.
Setting Description
Link To I/O… The Link button opens a dialog for linking the NC axis with the
drive hardware under I/O.
The link is displayed in the field to the right.
Link To PLC… The Link button opens a dialog for linking the NC axis with the
PLC instance of the axis.
The link is displayed in the field to the right.
Axis Type Type of connected drive hardware and protocol used.
Unit Physical unit of the position of the axis. The unit can be chosen
arbitrarily and edited in the Unit input field. It should be noted
that the scaling factor of the axis must be set accordingly (see
Encoder parameters).
Standard: Millimeter (mm)
Display (only) Adjustments to the display in the online axis dialog. These
settings do not affect data in the process image.
Position Changes the position display by one thousand digit (mm/µm)
Velocity Display of velocity in mm/min instead of mm/s.
The default time reference in NC and PLC remains the second
regardless of the display setting.
Modulo Display of the modulo position instead of the absolute position.
Result
Position Position
Velocity Velocity
Acceleration Acceleration
Jerk Jerk
Axis Cycle Time / Access Divider
Divider The axis is executed in every nth cycle of the NC-SAF task
with the cycle time divider. The divider can be set to a value
greater than 1 to reduce the system load for low-priority axes.
Modulo With a cycle time divider greater than 1, the modulo value
determines in which NC-SAF cycle the axis is processed. Axes
with the same modulo are processed in the same cycle. For
Setting Description
even distribution of the system load, the axes should be
distributed to different modulo values.
Example: Divider=4, Modulo 0..3
Cycle Time (ms) Axis cycle time
6.2.1.3 Parameter
Various axis settings can be made via the Parameter tab, which are described below.
Solely Reference Velocity also at MOTION | NC-Task 1 SAF | Axes | Axis 1 | Parameter | Maximum
Dynamics.
For analog control the Reference Velocity at a certain Output Ratio matches the analog input control signal
with the resulting physical velocity of axis motion. Furthermore, for control via a digital interface, e.g. SoE or
CoE, and for analog control the Reference Velocity at Output Ratio 1.0 prescribes a physical velocity limit
not to be exceeded by setpoint generation and positional control.
When drive controllers with analog inputs for their velocity control are used, the Reference Velocity combines
e.g. an input bias value for control with a physical velocity or a number of revolutions per minute of the
controlled axis. Comparatively, the analog input bias value may result from a kind of potentionmeter dividing
a voltage range for control. Similarly, a controlling current may be applied as an input source. For zero
control signal there is zero physical velocity. At a particular Output Ratio there is a corresponding Reference
Velocity, thus establishing a proportional relationship. For analog control, e.g. ±10V, the Reference Velocity
at Output Ratio 1.0 prescribes the setpoint velocity at the corresponding maximum output of e.g. 10V.
Pair of Numbers
Some drive setups may not be put into operation at their upper physical velocity limit corresponding to an
Output Ratio of 1.0. Instead, at a reasonably reduced velocity allocated for first driving experiences the
Reference Velocity may be determined at a reduced Output Ratio lower than 1.0. Thus, the link between
controlling input signal and physical velocity of motion is established by a pair of numbers, the Reference
Velocity and the Output Ratio adjoined to it. Internally, the scaling calculation is done by TwinCAT and it
calculates a Reference Velocity at Output Ratio 1.0. When for an Output Ratio 1.0 an axis is controlled at
its designed upper physical boundary setpoint, it is controlled at its reference velocity.
The Reference Velocity at Output Ratio 1.0 determines an upper physical limit for velocity control. So far,
there is no appropriate way to go faster. On the other hand, the parameter Maximum Velocity establishes an
upper limit for velocity control from a logical point of view. So far, there is no intended accomplishment to
drive beyond the Maximum Velocity limit, even though this might be physically possible up to the boundary
set by the Reference Velocity at Output Ratio 1.0. The Reference Velocity at Output Ratio 1.0 should not
succeed the Maximum Velocity. When the Maximum Velocity exceeds the Reference Velocity at Output
Ratio 1.0, an error message will be thrown. Likewise, at an axis start velocities exceeding the Reference
Velocity at Output Ratio 1.0 will be rejected by an NC error. Tacitly, cyclic controller output is limited to the
Reference Velocity at Output Ratio 1.0 without throwing an error.
To limit velocity and thus to protect hardware a lower output limit can be set for driving the axis. If just a part
of the output data type is valid it is necessary to limit the minimum output value. The Minimum Drive Output
Limitation is a directionally dependend limitation of the total output. The value 1.0 corresponds to unlimited
output of 100%. Typically, using this parameter one refers to a velocity output signal for the drive in
connection with position control. In exceptional cases the application of this parameter may refer to a torque
value or a current value.
To limit velocity and thus to protect hardware an upper output limit can be set for driving the axis. If just a
part of the output data type is valid it is necessary to limit the maximum output value. The Maximum Drive
Output Limitation is a directionally dependend limitation of the total output. The value 1.0 corresponds to
unlimited output of 100%. Typically, using this parameter one refers to a velocity output signal for the drive in
connection with position control. In exceptional cases the application of this parameter may refer to a torque
value or a current value.
Dynamic-Parameters
• Velocity Vel,
• Acceleration Acc,
• Deceleration Dec,
• Jerk.
The jerk is the derivative of acceleration or deceleration with respect to time. Thus, it describes how quickly
acceleration or deceleration change.
Limits • With respect to their absolute values, “maximum dynamic-values” exceed their cor-
responding “default dynamic-values”.
• Formally allowed: With respect to its absolute value, a “maximum dynamic-value”
equals its corresponding “default dynamic-value”.
Tc2_NC2,Tc2_MC2 • If the input value "0.0" is assigned to a motion function block for one of the dynam-
Default values ics parameters "Acc, Dec or Jerk", the value "0.0" is replaced by a default value for
this parameter.
• If no input value is assigned to a motion function block for one of the dynamic pa-
rameters "Acc, Dec or Jerk", this dynamic parameter is set to "0.0", and the value
"0.0" is replaced by a default value for this parameter.
Tc2_NC2, Tc2_MC2 • The maximum dynamic range is regarded as an actual physical limit for the corre-
Maximum dynamics sponding axis.
• Values exceeding the values prescribed by the maximum velocity are not accepted
and will lead to an error.
• Values that exceed the maximum acceleration and deceleration are accepted and
not rejected.
Tc2_NC2 • During an "Online Transformation" from slave to master, various measures are
"Online taken to prevent the maximum velocity being exceeded or the direction of move-
Transformation" ment being reversed.
• Examples of such measures are increasing the jerk or increasing the acceleration
or deceleration to the maximum value.
• From slave to master: Decoupling a slave axis in an accelerated or decelerated
movement.
Tc3_Mc • If for one of the dynamic-parameters “Acc, Dec, jerk” the input value “0.0” is as-
CoordinatedMotion signed to a motion function block, this assignment leads to an error that means that
Tc3_Mc this value is not allowed.
CollisionAvoidance • If for one of the dynamic-parameters “Acc, Dec, jerk” you would like to refer to a de-
Default Values fault value at a motion function block, this parameter has to be set to the constant
value “MC_Default”.
bCalibrationCam
A boolean input of MC_Home. It evaluates the signal of a reference cam. This reference signal may be
coupled into the control unit via a digital input.
Velocity used by an MC_Home function block driving towards a reference cam within the standard homing
sequence when the HomingMode MC_DefaultHoming is selected and the input bCalibrationCam is
evaluated.
Velocity used by an MC_Home function block driving off a reference cam within the standard homing
sequence when the HomingMode MC_DefaultHoming is selected and the input bCalibrationCam is
evaluated.
The buttons -- F1, - F2, + F3 and ++ F4 are in the “MOTION | NC-Task 1 SAF | Axes | Axis 1 | Online” dialog.
Online
Velocity used for MOTION | NC-Task 1 SAF | Axes | Axis 1 | Online | -- F1.
Velocity used for MOTION | NC-Task 1 SAF | Axes | Axis 1 | Online | ++ F4.
MC_Jog
Velocity used by an MC_Jog function block applied on the axis when its input JogForward or its input
JogBackwards is TRUE and MC_JOGMODE_STANDARD_FAST is selected as its Mode.
Online
Velocity used for MOTION | NC-Task 1 SAF | Axes | Axis 1 | Online | - F2.
Velocity used for MOTION | NC-Task 1 SAF | Axes | Axis 1 | Online | + F3.
MC_Jog
Velocity used by an MC_Jog function block applied on the axis when its input JogForward or its input
JogBackwards is TRUE and MC_JOGMODE_STANDARD_SLOW is selected as its Mode.
Unused.
Explicitly, this parameter is not used in any current TC3 motion library. Still, this parameter itself can be read
or be written or be employed by the user indirectly, e.g. within a user-made function block or within an HMI.
Unused.
Explicitly, this parameter is not used in any current TC3 motion library. Still, this parameter itself can be read
or be written or be employed by the user indirectly, e.g. within a user-made function block or within an HMI.
MC_JOGMODE_INCHING
The MC_Jog function block enables an axis to be moved via manual keys. The key signal can be linked
directly to the JogForward or the JogBackwards input. The desired operating mode is prescribed by the
input Mode. Applying mode MC_JOGMODE_INCHING a rising edge at one of the jog inputs moves the axis by
a certain distance that is assigned at the input Position.
Further Information:
• MC_Jog (PLC library Tc2_MC2)
Usually a stop is triggered by PLC code using MC_Stop. However, there are special applications within that
the time delay of stop has to be as small as possible. Within this situation the input Drive.Inputs.In.nState4
comes into play triggering a stop directly without being mapped via the PLC process image.
Variable nState4
The variable Drive.Inputs.In.nState4 can be mapped to any event source. Note its data type USINT and the
bit nState4.7 being responsible for the Fast Axis Stop.
For an axis the Fast Axis Stop is performed when its Drive.Inputs.In.nState4.7 variable exhibits the signal
type that is selected within the drop-down list "Fast Axis Stop Signal Type (optional)" and differs from “OFF
(default)”.
Signal Type
The “Fast Axis Stop Signal Type (optional)” enumeration specifies six elements:
• OFF (default)
For any signal type that the Drive.Inputs.In.nState4.7 variable exhibits no Fast Axis Stop is performed.
• Rising Edge
A Fast Axis Stop is performed when the Drive.Inputs.In.nState4.7 bit exhibits a rising edge.
• Falling Edge
A Fast Axis Stop is performed when the Drive.Inputs.In.nState4.7 bit exhibits a falling edge.
• Both Edges
A Fast Axis Stop is performed when the Drive.Inputs.In.nState4.7 bit exhibits a rising edge and a falling
edge, respectively. Alternatively, a Fast Axis Stop is performed when the Drive.Inputs.In.nState4.7 bit
exhibits a falling edge and a rising edge, respectively.
• High Active
A Fast Axis Stop is performed when the Drive.Inputs.In.nState4.7 bit appears high active.
• Low Active
A Fast Axis Stop is performed when the Drive.Inputs.In.nState4.7 bit appears low active.
Optional
An optional fast axis parameter has to differ from zero to be applied when a Fast Axis Stop is performed.
When a Fast Axis Stop is performed on the corresponding axis within the boundaries prescribed by the
“Maximum Dynamics” the “Fast Acceleration (optional)” float value accelerates the axis, the “Fast
Deceleration (optional)” float value decelerates the axis and the “Fast Jerk (optional)” float value is applied.
When a Fast Axis Stop is not performed, not any fast axis parameter is applied.
Further Information:
• MC_Stop (PLC library Tc2_MC2)
Limit Switches
The Limit Switches parameters can be set at MOTION | NC-Task 1 SAF | Axes | Axis 1 | Parameter.
Alternatively, the Limit Switches parameters can be set at MOTION | NC-Task 1 SAF | Axes | Axis 1 | Enc |
Parameter.
Minimum Position
Lower position boundary for the axis not to be descended when the Soft Position Limit Minimum Monitoring
is activated. Commands that violate this lower boundary are rejected.
Maximum Position
Upper position boundary for the axis not to be exceeded when the Soft Position Limit Maximum Monitoring is
activated. Commands that violate this upper boundary are rejected.
6.2.1.3.6 Monitoring
When position lag monitoring is performed, the Position Lag Error is monitored, and if prescribed limits of
position and time are exceeded, a runtime error is thrown.
The Position Lag Monitoring parameters can be set at MOTION | NC-Task 1 SAF | Axes | Axis 1 |
Parameter.
Alternatively, the Position Lag Monitoring parameters can be set at MOTION | NC-Task 1 SAF | Axes | Axis 1
| Ctrl | Parameter.
Maximum Position Lag Value and Maximum Position Lag Filter Time
The Maximum Position Lag Value is the upper boundary for the permitted position lag error not to be
exceeded for a time longer than the Maximum Position Lag Filter Time when the Position Lag Monitoring is
activated. Otherwise, the NC axis will be stopped instantaneously by a zero voltage output and the NC axis
will be placed into the logical “error” state throwing the error 0x4550.
[5]
[6] [7]
[9]
[8]
[1]
[2] [3]
[4]
In-Target Alarm
In-Target Timeout
When the In-Target Alarm is activated and the axis does not stay within the Target Position Window for the
In-Target Timeout time, the NC axis reports the error 0x435C. Thereby, time measurement is started when
the axis has reached its nominal position.
Motion Monitoring
Motion Monitoring checks whether an axis is actually moving while it is executing a motion command. This
makes it possible, for example, to detect the mechanical blocking of an axis at an early stage.
The parameter is set to TRUE to activate Motion Monitoring, otherwise no monitoring takes place.
The Motion Monitoring Window defines the distance that the encoder (actual position) should be expected to
travel during one cycle of the NC SAF task. Here a value/distance/length of some encoder increments can
be set.
Monitoring starts as soon as the axis executes a motion command and ends when the axis comes to a
logical standstill. If its actual position does not change by more than the Motion Monitoring Window in at least
one NC cycle during the Motion Monitoring Time, the NC axis outputs the error 0x435D.
Reduced (iterated): The override is based on the maximum velocity of the profile calculated by the setpoint
generator. Confer to parameter description at “MOTION | NC-Task 1 SAF | Axes | Axis 1 | Maximum
Dynamics | Maximum Velocity [} 23]”.
Original (iterated): The override is based on the maximum parameterized velocity of the actual command
currently performed. Thus, it can happen that e.g. 80 percent override and 100 percent override result in the
same nominal velocity.
Look at section Path Override (Interpreter Override Types) [} 110] for more information on path override.
The Rapid Traverse Velocity is used, when a G0 interpreter command is running. Look at section Rapid
Traverse [} 112] for a short description of the G0 interpreter command.
Segment Transitions
Segments are geometrical objects. We regard them as curves in terms of differential geometry that are
parameterized by their arc length.
A segment transition from a segment S_in to a segment S_out is classified in geometrical terms as type
Ck. Thereby, k is a natural number (including 0) describing k continuous arc length differentials for each
segment and corresponding k^th derivatives at the transition point.
C1 transitions: Appear smooth, but are not smooth in dynamic terms. At the segment transition point there is
a step change in acceleration.
C2 transitions: Are dynamically smooth their smoothness merely being restricted by jerk.
Segment Dynamics
Velocity v: The segment setpoint velocity v changes from v_in to v_out at the segment transition. At the
segment transition the setpoint velocity is always reduced to the lower one of the two values.
Acceleration a: At the segment transition the current path acceleration is always reduced to zero.
Jerk j: At the segment transition the jerk changes according to the segment transition geometry. This jerk
change can cause significant step change in dynamics.
Several reduction methods are available for C0 transitions. One of them is the VELOJUMP reduction
method. The VELOJUMP reduction method reduces the velocity after permitted step changes in velocity for
each axis.
Basically, v_link = min(v_in, v_out). For the axis [i] the permitted absolute step change in velocity
is v_jump[i] = C0[i] * min(A+[i], -A-[i]) * T. Thereby, C0[i] is the reduction factor, A+[i],
A-[i] are the acceleration or deceleration limits for the axis [i] and T is the cycle time. The VELOJUMP
reduction method ensures that the path velocity at segment transition v_link is reduced, whereby the
absolute step change in the axis setpoint velocity of axis [i] is at most v_jump[i]. Nevertheless, v_min
has priority: If v_link is less than v_min, v_link is set to v_min. In case of movement reversal with no
programmed stop there will be a step change in axis velocity.
Position Correction
The Position Correction can be activated at MOTION | NC-Task 1 SAF | Axes | Axis 1 | Parameter.
Alternatively, the Position Correction can be activated at MOTION | NC-Task 1 SAF | Axes | Axis 1 | Enc |
Parameter.
The variable axis.PlcToNc.PositionCorrection is of data type LREAL and belongs to the structure
PLCTONC_AXIS_REF. If Position Correction is enabled, this variable adds an additional offset onto the target
position. Note, that this correction does not affect software limits.
The filter time for the PT-1 filter that filters variations within the Actual Position Correction with the filter time
set here. Consult section PT1 Filter [} 112] for more information on a PT1 filter.
See also:
MC_PositionCorrectionLimiter
• TwinCAT 3 PLC Lib: Tc2_MC2
Backlash
This parameter remain merely for compatibility issues. See NC Backlash Compensation for further
information.
The delay time by that error propagation for the slave axis will be delayed if ‘DELAYED’ is selected as Error
Propagation Mode.
When within runtime an error appears at a slave axis the corresponding master axis will be set to error state
not before the time assigned here has ellapsed. A state of interest of the slave axis, in particular its error
state, can be watched by PLC code. Thus, the erroneous slave axis may be uncoupled to safely prevent the
whole axis combine from falling into error state.
TRUE: Coupled. The slave axis will follow the actual master position while and even though the master is
disabled.
The coupled slave axis follows the master axis within the Velocity Window. When velocity deviations beyond
the Velocity Window exceed the Filter Time for Velocity Window, an error will be thrown.
Generally speaking, an axis is in PTP mode for the whole time. The point is to transform a slave axis into a
master axis indirectly. Thus, it is uncoupled implicitly without PLC code having to engage MC_GearOut.
TRUE: To the slave axis a PTP command can be triggered without having to set the axis into PTP mode
before.
FALSE: Before a PTP command can be triggered to the slave axis, the slave axis has to be set into PTP
mode.
FALSE: Before a PTP command can be triggered to the external setpoint axis, the external setpoint axis has
to be set into PTP mode.
TRUE: To the external setpoint axis a PTP command can be triggered without having to set the axis into PTP
mode before.
This parameter remains merely for compatibility issues. Do not use it within new projects.
Data Persistence
6.2.1.4 Dynamics
The axis dynamics can be configured via the Parameter tab as well as via the Dynamics tab.
In this dialog the default axis dynamics is set. The default values are used if no explicit dynamics data are
given to a travel command.
The dynamics data Acceleration, Deceleration and Jerk can be entered here either directly or they are
determined indirectly via an acceleration time to the maximum velocity. In addition to the acceleration time,
the slider is used to determine the ratio of jerk and acceleration, thus selecting a rather stiff or smooth
setting.
6.2.1.5 Online
The Online tab is the main dialog for online axis operation. Here the enable can be set and after this the
corresponding axis can be moved manually. In addition, the most important axis states are displayed when
the configuration is active.
DANGER
Risk of injury due to movement of axes!
The commissioning results in a movement of axes.
• Make sure that neither you nor others are harmed by the movement, e.g. by maintaining a suitable
safety distance.
• Do not perform any action whose consequences you cannot estimate
WARNING
Incorrect axis position during initial commissioning
Without referencing / calibrating the axis position, the displayed axis position may deviate from the actual
axis position.
• Perform a homing to determine the correct actual position using a reference signal.
The dialog is divided into the display of the most important axis states, the setting of the axis enable, input
fields as well as function keys for controller settings and travel commands. The units of the values depend on
the set "Base" unit.
Display
The actual position of the axis is determined from the feedback of the encoder system and displayed in the
large unlabeled field.
Error Axle error code. An axis error can be deleted with the reset key.
Set enables
Via the button Set the controller enable, the feed enables and the override of the axis can be set.
If the NC axis is operated in velocity mode (CSV), the position is controlled by the NC. At this point the two
most important parameters, the gain factor Kv and the reference velocity, can be set. Further setting options
can be found in the parameters of the axis.
Function button
F5 Start, with the values set in the input fields and the set dynamics.
F6 Stop
F8 Reset
6.2.1.6 Functions
In the Functions tab the most important commands for commissioning can be given to the axis.
Different travel commands like absolute start, relative start or endless travel can be selected in the Extended
Start frame . The necessary parameters below will adjust according to the selection of the start type. Thus, in
reverse mode, there are two target positions between which the axis moves back and forth.
The drive output can be set to a fixed value for commissioning in the Raw Drive Output frame. This setting
must be used very carefully.
The axis position can be set to a new value in the Set Actual Position frame.
Set Target Position changes the target position of the axis during a travel command.
6.2.1.7 Coupling
Two axes can be coupled with each other in the Coupling tab. To do this, first select the master axis and the
desired coupling method, e.g. linear coupling. Afterwards, necessary parameters, such as the gear ratio, can
be entered. The Couple button executes the coupling, Decouple decouples the axes again.
6.2.1.8 Compensation
A superimposed travel command can be triggered during the travel of an axis in the Compensation tab
(position compensation or superposition).
6.2.2.1 General
Property Description
Name Selected name of the object.
Object Id 32-bit identification number that is automatically assigned and unique within a
project.
Type Encoder type
The selected encoder type is displayed at this point. Changes of the encoder type
can be done via the NC-Encoder [} 42] dialog.
Comment Freely editable field for user notes.
Id Identification number of the encoder, which is assigned consecutively. When an
encoder is deleted, the number becomes free again and can be assigned to a new
encoder.
Disabled An encoder cannot be disabled on its own, but only by disabling the entire axis.
Create symbols This option generates typical symbol names that are used in TwinCAT Scope, for
example.
6.2.2.2 NC-Encoder
Property Description
Link To (all Types) Every encoder that is not of the "Simulation encoder" type must be associated with
an actual value acquisition module. In the simplest case, this is done automatically
with the linking of the axis to the drive. In individual cases, in particular when
unknown hardware components are integrated in the system, these links must be
established manually , see Process image [} 51].
Type Encoder type selection
6.2.2.3 Parameter
Encoder
Depending on their operating modes encoders determine the actual position, actual velocity or actual
acceleration or deceleration. Regularly, actual values fluctuate intemperately. So, for each mode a
parameterizable filter is available to ensure a reasonable resolution.
A wide variety of encoder versions is supported. Available are absolute and incremental encoders.
Furthermore, there are simulation encoders and there are special encoders for the determination of force.
The encoder parameters include scaling, zero offset shift and the modulo factor. There are encoder
parameters for software end locations and for reference travel.
If set TRUE, the parameter Invert Encoder Counting Direction inverts the counting direction of the encoder.
• FALSE: The polarity of the axis movement agrees with the counting direction of the acquisition
hardware.
• TRUE: The polarity of the axis movement is opposite to the counting direction of the acquisition
hardware.
WARNING
Risk of Unexpected Movements
If the encoder counting direction and the motor polarity do not match with each other, the axis will make
unexpected movements.
The scaling factor is subdivided into a numerator and a denominator. It converts displacement increments
into axis positions or calculates a user unit out of encoder increments.
Position Bias
The position bias is an offset used for absolute encoders to align their position within the machine coordinate
system and thus to specify the machine-dependent zero point. Thereby, the position bias offset value is
added to the encoder position to determine the axis position.
The value of the Modulo Factor (e.g. 360.0°) is the value to calculate modulo turns and modulo positions out
of the absolute axis position. For rotating axes the Modulo Factor is the “distance” represented by one
rotation. For instance, 360.0° should be entered here, if the actual rotational value is acquired in degrees.
The Tolerance Window for Modulo Start should be big enough to allow backward movements, if a modulo
forward command is running inside the window area. Vice versa, the Tolerance Window for Modulo Start
should be big enough to allow forward movements, if a modulo backward command is running inside the
window area.
Further Information:
• Notes on modulo positioning (PLC library Tc2_MC2)
The encoder mask defines the number of allowed increments until the feedback value flows over. Thereby,
the increments are not the real encoder increments.
The encoder submask defines the number of increments per motor turn.
Setting a level this parameter creates artificial noise for the simulation axis to make it appear more realistic.
Reference System
Use the Reference System parameter to select how the encoder values should be interpreted:
INCREMENTAL
INCREMENTAL mode does not use absolute characteristics of the physical feedback system, but can be
used with both incremental and absolute encoder systems. After starting the control, homing is required to
initialize the actual position of the axis.
This mode extends the INCREMENTAL mode and can be used instead.
If in this mode the retain data of the NC-SAF task and the axis parameter Data Persistence are activated, the
system starts up with the last stored position. If a single-turn absolute encoder is used at the same time, a
deviation of up to half an encoder revolution is also taken into account and the axis can be operated within
these limits without homing. The absolute range of the encoder system is defined by the parameter Encoder
Sub Mask.
ABSOLUTE
The ABSOLUTE mode can be used with multi-turn absolute encoder systems. The prerequisite is that the
encoder system or the motor is installed in such a way that there can't be overflow of the position feedback
within the travel path. An overflow would be acknowledged with a runtime error.
The ABSOLUTE MULTITURN RANGE mode can also be used with multi-turn absolute encoder systems.
The encoder system can be installed in any way, so that a maximum of one overflow may occur in the travel
path. To ensure correct evaluation, the two end positions must be parameterized.
The total travel path must be less than the absolute range of the encoder. The absolute range of the encoder
system is defined by the parameter Encoder Mask.
The ABSOLUTE SINGLETURN RANGE mode can be used with single-turn absolute encoder systems. The
encoder system can be installed in such a way that an overflow is located in the travel path. To ensure
correct evaluation, the two end positions must be parameterized.
The total travel path must be less than the absolute range of the encoder, i.e. less than one encoder
revolution. The absolute range of the encoder system is defined by the parameter Encoder Sub Mask.
ABSOLUTE (modulo)
The ABSOLUTE (modulo) mode can be used when the travel path of an axis exceeds the absolute range of
the encoder system. For example, in the case of an endlessly running conveyor belt.
To initialize the position of the axis correctly at system start, the retain data of the NC-SAF task and the
parameter Data Persistence of the axis must be activated. Furthermore, the parameter Modulo Factor of the
encoder of the NC axis must be parameterized correctly. The axis position is initialized to this module range
after the system startup.
When switched off, the axis may be mechanically displaced by a maximum of half of the absolute range.
This maximum distance is defined by the Encoder Sub Mask parameter. The Encoder Sub Mask is typically
set to the increments of one motor revolution, but can also be set to the entire absolute range here.
Limit Switches
The Limit Switches parameters can be set at MOTION | NC-Task 1 SAF | Axes | Axis 1 | Parameter.
Alternatively, the Limit Switches parameters can be set at MOTION | NC-Task 1 SAF | Axes | Axis 1 | Enc |
Parameter.
Minimum Position
Lower position boundary for the axis not to be descended when the Soft Position Limit Minimum Monitoring
is activated. Commands that violate this lower boundary are rejected.
Maximum Position
Upper position boundary for the axis not to be exceeded when the Soft Position Limit Maximum Monitoring is
activated. Commands that violate this upper boundary are rejected.
6.2.2.3.3 Filter
In the case of very noisy encoder signals, it may therefore be necessary to filter the position value with a low
filter time.
See section PT1 Filter [} 112] for further information on the PT1 filter.
6.2.2.3.4 Homing
Homing refers to an axis initialization run during which the correct actual position is determined by means of
a reference signal. This can be NC-guided, as described here.
Alternatively, there is also drive-guided homing, which is performed independently by a suitable drive without
the influence of the control system. For details, please refer to the documentation of the drive system used.
Procedure
Parameterization
For the default homing sequence the direction for calibration cam search can be inverted.
• FALSE: cam is looked for in the direction of positive movement.
• TRUE: cam is looked for in the direction of negative movement.
For the default homing sequence the direction for sync pulse search can be inverted.
• FALSE: sync pulse is looked for in the direction of positive movement.
• TRUE: sync pulse is looked for in the direction of negative movement.
The Home Position is the position value that will be assigned to the axis when the sync pulse appears within
the homing. This is done exactly with the sync pulse while in motion. Since the axis then stops, the standstill
position deviates from the parameterized value. The referencing is nevertheless exact.
The parameter Reference Mode offers the opportunity to select which signal shall be used for sync impulse
search:
• ‘Default’ / ‘Homing Sensor Only (PLC cam or digital input 1..8)’
◦ The simplest way of referencing an axis where only the cam signal is evaluated. Another sync
signal is not used, so this setting should only be selected if the axis does not offer more extensive
options.
• ‘Hardware Sync (Feedback reference pulse)’
◦ Some encoder systems provide a sync pulse per revolution (zero track) in addition to the count.
The homing precision can be enhanced by selecting this mode, if the encoder evaluation logic is
able to pick up the sync pulse. The precision is comparable with Software Sync. Hardware Sync
mode may require parameterization or special wiring of the drive or encoder system.
• ‘Hardware Latch 1 (pos. edge)’, ‘Hardware Latch 1 (neg. edge)’
◦ Hardware latch responds to an external latch signal in addition to the cam signal. For this purpose,
the latch mechanism must be configured in the drive and the latch input must be wired.
• ‘Software Sync’
◦ Software Sync mode enhances the homing precision by additionally detecting the encoder count
overflow after an encoder or motor revolution, after the reference cam signal has been detected.
This mode requires a part-absolute encoder (e.g. resolver) with constant overflow interval relative
to the reference cam. Overflow detection is parameterized via the Reference Mask parameter.
• ‘Application (PLC code)’
◦ In this case, the entire homing procedure must be programmed in the PLC:
In this case, the NC sets bit 23 in the "NcApplicationRequest" status, which is polled by the PLC.
Via MC_ReadApplicationRequest the request of the NC can be determined in the PLC. So far only
0 = NONE and 1 = HOMING is supported (see 0x33 at "Index offset" specification for axis
parameter). In the case of homing, the PLC can perform the sequence itself by moving the axis.
Further information
• Homing on the AX5000
• MC_Home in the Tc2_MC2
Encoder Mode
The parameter Encoder Mode offers the opportunity to select which values shall be calculated from the
encoder position:
• ‘POS’: The actual position is determined.
• ‘POSVELO’: The actual position and the actual velocity are determined.
• ‘POSVELOACC’: The actual position, the actual velocity and the actual acceleration are determined.
Position Correction
The Position Correction can be activated at MOTION | NC-Task 1 SAF | Axes | Axis 1 | Parameter.
Alternatively, the Position Correction can be activated at MOTION | NC-Task 1 SAF | Axes | Axis 1 | Enc |
Parameter.
The variable axis.PlcToNc.PositionCorrection is of data type LREAL and belongs to the structure
PLCTONC_AXIS_REF. If Position Correction is enabled, this variable adds an additional offset onto the target
position. Note, that this correction does not affect software limits.
The filter time for the PT-1 filter that filters variations within the Actual Position Correction with the filter time
set here. Consult section PT1 Filter [} 112] for more information on a PT1 filter.
See also:
MC_PositionCorrectionLimiter
• TwinCAT 3 PLC Lib: Tc2_MC2
Further details on dead time compensation can be found in the documentation TF5065 TwinCAT 3 | PLC
Motion Control XFC/XFC NC I.
6.2.2.5 Online
Property Description
Position Actual position of the encoder
Id Automatically assigned encoder ID
Uncorrected Position Actual position without corrections, such as position correction or position
filtering
Property Description
Correction Position correction
Hard Increments Incremental counter value from the encoder hardware
Soft Increments Evaluated incremental counter value of the NC
Modulo Actual Pos Modulo actual position (calculated with the parameterized modulo factor)
Modulo Turns Integer modulo revolutions (calculated from the actual position)
Latch Pos. Diff. Position difference between the referencing cam and the latch event, which is
determined during homing.
Calibration Flag If an absolute encoder system is configured, it is calibrated from the start. An
incremental encoder system is only calibrated after homing.
The calibration state can be changed manually via the Set and Reset buttons.
Set Actual Position The actual position can be set manually here. The position is set directly as
entered in the "Absolute" mode. The position is shifted by this amount in the
"Relative" mode.
Notice The data structures described here form an internal interface between NC drivers and
connected drive hardware. This interface is constantly under development and can change in the
future.
Various encoder hardware or the corresponding Bus Terminals for detecting the position of an axis are
connected via the encoder process image (cyclic data exchange). Insofar as this hardware is directly
supported by the system, no manual configuration of individual variables is necessary.
Depending on the encoder/drive, the NC variables can be interpreted as signed or unsigned. In addition,
the nDataIn variables can be linked with 2 or 4 byte references. (In the special case not discussed here
also with 8 byte references)
UINT / INT
(2 byte)
nOutData2 UDINT / reserved
DINT (4 byte)
or
UINT / INT
(2 byte)
nCtrl1 USINT Optional control information
For example, communication to Position Latch, communication Encoder
Reset, Register Communication
nCtrl2 USINT Additional optional control information
For example, communication to Position Latch, communication Encoder
Reset, communication to Read an Absolute Position
nCtrl3 USINT reserved
nCtrl4 USINT reserved
nOutData3 UDINT / reserved
DINT (4 byte)
or
UINT / INT
(2 byte)
nOutData4 UDINT / reserved
DINT (4 byte)
or
UINT / INT
(2 byte)
nOutData5 UDINT / reserved
DINT (4 byte)
6.2.3.1 General
Property Description
Name Selected name of the object.
Object Id 32-bit identification number that is automatically assigned and unique within a
project.
Type Drive type
The selected drive type is displayed at this point. Changes to the drive type can be
made via the NC-Drive [} 56] [} 42] dialog.
Comment Freely editable field for user notes.
Id Identification number of the drive, which is assigned consecutively. When a drive is
deleted, the number becomes free again and can be assigned to a new encoder.
Disabled A drive cannot be disabled on its own, but only by disabling the entire axis.
Create symbols This option generates typical symbol names that are used in TwinCAT Scope, for
example.
6.2.3.2 NC-Drive
Fig. 1:
Property Description
Link To (all Types) The button is used to establish the connection to the drive hardware. Note that drive
devices containing both the motor and the encoder are linked via the link button of
the higher-level NC axis. Only with separate devices (e.g. encoder terminal/analog
output terminal) is the drive output linked at this point.
Type After a configured drive device or output terminal has been selected, the drive type
sets itself to match it.
6.2.3.3 Parameter
Drive
The drive transfers the output voltage to the power section of the motor. A wide variety of drive versions is
supported: E.g. servo drives, low speed drives, high speed drives, stepper motor drives. The drive
parameters include the motor polarity and the reference speed.
Analog Drive
Within this context analog does not mean that the speed is represented by a voltage (e.g. ±10 V) or a current
(e.g. ±20 mA), but rather that the axis can be adjusted over an effectively continuous range of values. This
kind of adjustment is also possible for drives with digital interfaces such as the BISSI Terminals of type
KL5051. Employing such a digital interface a speed can be adjusted like controlling an analog value, even
though being transported in the form of digital information.
If set TRUE, the parameter Invert Motor Polarity inverts the polarity of the motor and thus inverts the direction
of motor rotation.
• FALSE: In response to positive drive the axis moves in the direction of larger positions.
• TRUE: In response to positive drive the axis moves in the direction of smaller positions.
WARNING
Risk of Unexpected Movements
If the encoder counting direction and the motor polarity do not match with each other, the axis will make
unexpected movements.
Habitually, the drive parameter Output Scaling Factor (Position) does not evoke an effect. In principle, to
avoid to infer its future use the user should not change the default value 1.0 of this parameter.
The positional output scaling is already set by the encoder input scaling. Regularly, the positional input
scaling equals the positional output scaling for a drive. For this reason, the drive parameter Output Scaling
Factor (Position) is currently not evaluated. Instead, solely the encoder parameters Scaling Factor
Numerator and Scaling Factor Denominator do the scaling work and have to be adjusted for accurate
scaling.
When a drive controler operates in velocity precontrol mode, the NC output value has to be scaled. To do
this scaling there are two possibilities whose choice depends on the type of the employed drive controller.
Following, a tabular comparison shows, when the Reference Velocity parameter or the Output Scaling Factor
(Velocity) parameter has to be applied.
M2400_DAC1 x
M2400_DAC2 x
M2400_DAC3 x
M2400_DAC4 x
KL4XXX x
KL4XXX_NONLINEAR x
TWOSPEED x
STEPPER x
SERCOS x
KL5051 x
AX2000_B200 x
SIMO611U x
UNIVERSAL x
NCBACKPLANE x
CANOPEN_LENZE x
DS402_MDP742 x
AX2000_B900 x
AX2000_B310 x
AX2000_B100 x
KL2531 x
KL2532 x
TCOM_DRV x
MDP_733 x
MDP_703 x (x)*
*
Also possible, but should be regularly left on the value 1.0.
The output of the velocity value can be delayed by the Output Delay (Velocity) time.
To limit velocity and thus to protect hardware a lower output limit can be set for driving the axis. If just a part
of the output data type is valid it is necessary to limit the minimum output value. The Minimum Drive Output
Limitation is a directionally dependend limitation of the total output. The value 1.0 corresponds to unlimited
output of 100%. Typically, using this parameter one refers to a velocity output signal for the drive in
connection with position control. In exceptional cases the application of this parameter may refer to a torque
value or a current value.
To limit velocity and thus to protect hardware an upper output limit can be set for driving the axis. If just a
part of the output data type is valid it is necessary to limit the maximum output value. The Maximum Drive
Output Limitation is a directionally dependend limitation of the total output. The value 1.0 corresponds to
unlimited output of 100%. Typically, using this parameter one refers to a velocity output signal for the drive in
connection with position control. In exceptional cases the application of this parameter may refer to a torque
value or a current value.
This group of parameters creates an optional acceleration as a servo control that is supposed to act before a
lag distance evolves. It may set e.g. a torque value.
Time for the P-T1 filter. This time comes as an input to the P-T1 filter.
Derivative of the actual torque to be scaled. This derivative comes as an input to the P-T1 filter.
Consult section PT1 Filter [} 112] for more information on a PT1 filter.
The output of the torque value can be delayed by the Output Delay (Torque) time.
Sometimes an optional output scaling for acceleration is needed. (E.g. for NC acceleration feedforward.
Consult section Acceleration Feedforward [} 108] for more information on acceleration feedforward.)
The output of the acceleration value can be delayed by the Output Delay (Acceleration) time.
Within this section cam tables are employed to construct linear position coupling. Thus, for numerical control
e.g. a hydraulic axis may be treated similarly to a servo axis.
A cam plate is a relation R that describes non-linear position coupling between a master axis and a slave
axis:
• y = R(x),
• x-axis: master axis position,
• y-axis: slave axis position.
This relation is stored within a valve diagram table. Within this table the number pairs (x, y) are discrete.
Each valve diagram table has its own identification number Id. It is assigned serially to each table. The table
Id uniquely identifies the cam plate in the TwinCAT system.
can be selected to join the discrete number pairs (x, y) within the valve diagram table.
This parameter allows to adjust a zero transition of a position coupling curvature through the origin. Thus,
e.g. a hysteresis branch can be adjusted to run through the origin.
Employing a cam plate relation some simple types of hydraulic axes can be controlled like servo axes. For
more intricate types of hydraulic axes follow
• TwinCAT PLC Hydraulics or
https://infosys.beckhoff.com/content/1033/tcplclibhydraulics30/index.html
to find information on controlling them with the TwinCAT PLC Hydraulics Library.
When
• ‘OFF (default)’
As filter types
• ‘Moving Average’ or
• ‘P-Tn’
‘Moving Average’: As an output the Moving Average Filter creates an average over a set of position
setpoint values that comes as an input to the filter. Thereby, the Smoothing Filter Time prescribes the time
interval over that the average spans. Values of the input set are created by position setpoint generation.
Thus, the value generation frequency is determined by the cycle time of the task generating the setpoint
values.
When a new value is generated e.g. each 1ms and the Smoothing Filter Time is set to e.g. 20ms an average
is taken over 20 values. Thereby, the influence of a setpoint value is perceptible for 20ms.
‘P-Tn’: As an output the P-Tn Filter creates an average over a set of position setpoint values that comes as
an input to the filter. Thereby, the Smoothing Filter Time prescribes the time constant of the P-Tn Filter.
Values of the input set are created by position setpoint generation. Thus, the value generation frequency is
determined by the cycle time of the task generating the setpoint values.
Smoothing Filter
In some applications position command output smoothing is used to reduce vibrations of machine parts. This
smoothing forms an additional filter that should be handled with care. This filter cannot be compensated by a
static dead time.
Some C1D errors of the hardware drive can be delayed by setting this parameter to ‘IGNORE SELECTED
ERRORS’.
Drive Mode
Currently, there is merely one drive mode, the ‘STANDARD’ drive mode. In principle, other modes are
imaginable implementing a more open system.
This value is added to the drive control level. In this way, a constant offset can be added to the output to
compensate zero errors in analog drives, for instance.
Confer section Automatic DAC Offset Adjustment [} 108].
Following Error
The Following Error is equal to the Lag Distance, also called Position Lag Error.
Following error calculation can be done with the NC or inside the hardware drive. For all hardware drives
working in position control mode the calculation should be done externally on the hardware drive.
‘Extern’: The Following Error Calculation is done within the drive controller externally.
Further details on dead time compensation can be found in the documentation TF5065 TwinCAT 3 | PLC
Motion Control XFC/XFC NCI.
Notice The data structures described here form an internal interface between NC drivers and
connected drive hardware. This interface is constantly under development and can change in the
future.
Various drive hardware or the corresponding Bus Terminals (+/- 10V, PWM etc.) are connected via the drive
process image. Insofar as this hardware is directly supported by the system, no manual configuration is
necessary.
The PLC is connected via the cyclic process image of an axis. For this purpose, an instance of the AXIS_REF
structure is created in the PLC, which is then linked to the cyclic process image.
PLCTONC_AXIS_REF
NCTOPLC_AXIS_REF
At “MOTION | NC-Task 1 SAF | Axes | Axis 1” the file card Parameter displays the parameter groups
• Maximum Dynamics,
• Default Dynamics,
• Manual Motion and Homing,
• Fast Axis Stop,
• Limit Switches,
• Monitoring,
• Setpoint Generator,
• NCI Parameter,
• Other Settings.
Solely Reference Velocity also at MOTION | NC-Task 1 SAF | Axes | Axis 1 | Parameter | Maximum
Dynamics.
For analog control the Reference Velocity at a certain Output Ratio matches the analog input control signal
with the resulting physical velocity of axis motion. Furthermore, for control via a digital interface, e.g. SoE or
CoE, and for analog control the Reference Velocity at Output Ratio 1.0 prescribes a physical velocity limit
not to be exceeded by setpoint generation and positional control.
When drive controllers with analog inputs for their velocity control are used, the Reference Velocity combines
e.g. an input bias value for control with a physical velocity or a number of revolutions per minute of the
controlled axis. Comparatively, the analog input bias value may result from a kind of potentionmeter dividing
a voltage range for control. Similarly, a controlling current may be applied as an input source. For zero
control signal there is zero physical velocity. At a particular Output Ratio there is a corresponding Reference
Velocity, thus establishing a proportional relationship. For analog control, e.g. ±10V, the Reference Velocity
at Output Ratio 1.0 prescribes the setpoint velocity at the corresponding maximum output of e.g. 10V.
Pair of Numbers
Some drive setups may not be put into operation at their upper physical velocity limit corresponding to an
Output Ratio of 1.0. Instead, at a reasonably reduced velocity allocated for first driving experiences the
Reference Velocity may be determined at a reduced Output Ratio lower than 1.0. Thus, the link between
controlling input signal and physical velocity of motion is established by a pair of numbers, the Reference
Velocity and the Output Ratio adjoined to it. Internally, the scaling calculation is done by TwinCAT and it
calculates a Reference Velocity at Output Ratio 1.0. When for an Output Ratio 1.0 an axis is controlled at
its designed upper physical boundary setpoint, it is controlled at its reference velocity.
The Reference Velocity at Output Ratio 1.0 determines an upper physical limit for velocity control. So far,
there is no appropriate way to go faster. On the other hand, the parameter Maximum Velocity establishes an
upper limit for velocity control from a logical point of view. So far, there is no intended accomplishment to
drive beyond the Maximum Velocity limit, even though this might be physically possible up to the boundary
set by the Reference Velocity at Output Ratio 1.0. The Reference Velocity at Output Ratio 1.0 should not
succeed the Maximum Velocity. When the Maximum Velocity exceeds the Reference Velocity at Output
Ratio 1.0, an error message will be thrown. Likewise, at an axis start velocities exceeding the Reference
Velocity at Output Ratio 1.0 will be rejected by an NC error. Tacitly, cyclic controller output is limited to the
Reference Velocity at Output Ratio 1.0 without throwing an error.
To limit velocity and thus to protect hardware a lower output limit can be set for driving the axis. If just a part
of the output data type is valid it is necessary to limit the minimum output value. The Minimum Drive Output
Limitation is a directionally dependend limitation of the total output. The value 1.0 corresponds to unlimited
output of 100%. Typically, using this parameter one refers to a velocity output signal for the drive in
connection with position control. In exceptional cases the application of this parameter may refer to a torque
value or a current value.
To limit velocity and thus to protect hardware an upper output limit can be set for driving the axis. If just a
part of the output data type is valid it is necessary to limit the maximum output value. The Maximum Drive
Output Limitation is a directionally dependend limitation of the total output. The value 1.0 corresponds to
unlimited output of 100%. Typically, using this parameter one refers to a velocity output signal for the drive in
connection with position control. In exceptional cases the application of this parameter may refer to a torque
value or a current value.
Dynamic-Parameters
• Velocity Vel,
• Acceleration Acc,
• Deceleration Dec,
• Jerk.
The jerk is the derivative of acceleration or deceleration with respect to time. Thus, it describes how quickly
acceleration or deceleration change.
Limits • With respect to their absolute values, “maximum dynamic-values” exceed their cor-
responding “default dynamic-values”.
• Formally allowed: With respect to its absolute value, a “maximum dynamic-value”
equals its corresponding “default dynamic-value”.
Tc2_NC2,Tc2_MC2 • If the input value "0.0" is assigned to a motion function block for one of the dynam-
Default values ics parameters "Acc, Dec or Jerk", the value "0.0" is replaced by a default value for
this parameter.
• If no input value is assigned to a motion function block for one of the dynamic pa-
rameters "Acc, Dec or Jerk", this dynamic parameter is set to "0.0", and the value
"0.0" is replaced by a default value for this parameter.
Tc2_NC2, Tc2_MC2 • The maximum dynamic range is regarded as an actual physical limit for the corre-
Maximum dynamics sponding axis.
• Values exceeding the values prescribed by the maximum velocity are not accepted
and will lead to an error.
• Values that exceed the maximum acceleration and deceleration are accepted and
not rejected.
Tc2_NC2 • During an "Online Transformation" from slave to master, various measures are
"Online taken to prevent the maximum velocity being exceeded or the direction of move-
Transformation" ment being reversed.
• Examples of such measures are increasing the jerk or increasing the acceleration
or deceleration to the maximum value.
• From slave to master: Decoupling a slave axis in an accelerated or decelerated
movement.
Tc3_Mc • If for one of the dynamic-parameters “Acc, Dec, jerk” the input value “0.0” is as-
CoordinatedMotion signed to a motion function block, this assignment leads to an error that means that
Tc3_Mc this value is not allowed.
CollisionAvoidance • If for one of the dynamic-parameters “Acc, Dec, jerk” you would like to refer to a de-
Default Values fault value at a motion function block, this parameter has to be set to the constant
value “MC_Default”.
bCalibrationCam
A boolean input of MC_Home. It evaluates the signal of a reference cam. This reference signal may be
coupled into the control unit via a digital input.
Velocity used by an MC_Home function block driving towards a reference cam within the standard homing
sequence when the HomingMode MC_DefaultHoming is selected and the input bCalibrationCam is
evaluated.
Velocity used by an MC_Home function block driving off a reference cam within the standard homing
sequence when the HomingMode MC_DefaultHoming is selected and the input bCalibrationCam is
evaluated.
The buttons -- F1, - F2, + F3 and ++ F4 are in the “MOTION | NC-Task 1 SAF | Axes | Axis 1 | Online” dialog.
Online
Velocity used for MOTION | NC-Task 1 SAF | Axes | Axis 1 | Online | -- F1.
Velocity used for MOTION | NC-Task 1 SAF | Axes | Axis 1 | Online | ++ F4.
MC_Jog
Velocity used by an MC_Jog function block applied on the axis when its input JogForward or its input
JogBackwards is TRUE and MC_JOGMODE_STANDARD_FAST is selected as its Mode.
Online
Velocity used for MOTION | NC-Task 1 SAF | Axes | Axis 1 | Online | - F2.
Velocity used for MOTION | NC-Task 1 SAF | Axes | Axis 1 | Online | + F3.
MC_Jog
Velocity used by an MC_Jog function block applied on the axis when its input JogForward or its input
JogBackwards is TRUE and MC_JOGMODE_STANDARD_SLOW is selected as its Mode.
Unused.
Explicitly, this parameter is not used in any current TC3 motion library. Still, this parameter itself can be read
or be written or be employed by the user indirectly, e.g. within a user-made function block or within an HMI.
Unused.
Explicitly, this parameter is not used in any current TC3 motion library. Still, this parameter itself can be read
or be written or be employed by the user indirectly, e.g. within a user-made function block or within an HMI.
MC_JOGMODE_INCHING
The MC_Jog function block enables an axis to be moved via manual keys. The key signal can be linked
directly to the JogForward or the JogBackwards input. The desired operating mode is prescribed by the
input Mode. Applying mode MC_JOGMODE_INCHING a rising edge at one of the jog inputs moves the axis by
a certain distance that is assigned at the input Position.
Further Information:
• MC_Jog (PLC library Tc2_MC2)
Usually a stop is triggered by PLC code using MC_Stop. However, there are special applications within that
the time delay of stop has to be as small as possible. Within this situation the input Drive.Inputs.In.nState4
comes into play triggering a stop directly without being mapped via the PLC process image.
Variable nState4
The variable Drive.Inputs.In.nState4 can be mapped to any event source. Note its data type USINT and the
bit nState4.7 being responsible for the Fast Axis Stop.
For an axis the Fast Axis Stop is performed when its Drive.Inputs.In.nState4.7 variable exhibits the signal
type that is selected within the drop-down list "Fast Axis Stop Signal Type (optional)" and differs from “OFF
(default)”.
Signal Type
The “Fast Axis Stop Signal Type (optional)” enumeration specifies six elements:
• OFF (default)
For any signal type that the Drive.Inputs.In.nState4.7 variable exhibits no Fast Axis Stop is performed.
• Rising Edge
A Fast Axis Stop is performed when the Drive.Inputs.In.nState4.7 bit exhibits a rising edge.
• Falling Edge
A Fast Axis Stop is performed when the Drive.Inputs.In.nState4.7 bit exhibits a falling edge.
• Both Edges
A Fast Axis Stop is performed when the Drive.Inputs.In.nState4.7 bit exhibits a rising edge and a falling
edge, respectively. Alternatively, a Fast Axis Stop is performed when the Drive.Inputs.In.nState4.7 bit
exhibits a falling edge and a rising edge, respectively.
• High Active
A Fast Axis Stop is performed when the Drive.Inputs.In.nState4.7 bit appears high active.
• Low Active
A Fast Axis Stop is performed when the Drive.Inputs.In.nState4.7 bit appears low active.
Optional
An optional fast axis parameter has to differ from zero to be applied when a Fast Axis Stop is performed.
When a Fast Axis Stop is performed on the corresponding axis within the boundaries prescribed by the
“Maximum Dynamics” the “Fast Acceleration (optional)” float value accelerates the axis, the “Fast
Deceleration (optional)” float value decelerates the axis and the “Fast Jerk (optional)” float value is applied.
When a Fast Axis Stop is not performed, not any fast axis parameter is applied.
Further Information:
• MC_Stop (PLC library Tc2_MC2)
Limit Switches
The Limit Switches parameters can be set at MOTION | NC-Task 1 SAF | Axes | Axis 1 | Parameter.
Alternatively, the Limit Switches parameters can be set at MOTION | NC-Task 1 SAF | Axes | Axis 1 | Enc |
Parameter.
Minimum Position
Lower position boundary for the axis not to be descended when the Soft Position Limit Minimum Monitoring
is activated. Commands that violate this lower boundary are rejected.
Maximum Position
Upper position boundary for the axis not to be exceeded when the Soft Position Limit Maximum Monitoring is
activated. Commands that violate this upper boundary are rejected.
7.1.6 Monitoring
When position lag monitoring is performed, the Position Lag Error is monitored, and if prescribed limits of
position and time are exceeded, a runtime error is thrown.
The Position Lag Monitoring parameters can be set at MOTION | NC-Task 1 SAF | Axes | Axis 1 |
Parameter.
Alternatively, the Position Lag Monitoring parameters can be set at MOTION | NC-Task 1 SAF | Axes | Axis 1
| Ctrl | Parameter.
Maximum Position Lag Value and Maximum Position Lag Filter Time
The Maximum Position Lag Value is the upper boundary for the permitted position lag error not to be
exceeded for a time longer than the Maximum Position Lag Filter Time when the Position Lag Monitoring is
activated. Otherwise, the NC axis will be stopped instantaneously by a zero voltage output and the NC axis
will be placed into the logical “error” state throwing the error 0x4550.
[5]
[6] [7]
[9]
[8]
[1]
[2] [3]
[4]
In-Target Alarm
In-Target Timeout
When the In-Target Alarm is activated and the axis does not stay within the Target Position Window for the
In-Target Timeout time, the NC axis reports the error 0x435C. Thereby, time measurement is started when
the axis has reached its nominal position.
Motion Monitoring
Motion Monitoring checks whether an axis is actually moving while it is executing a motion command. This
makes it possible, for example, to detect the mechanical blocking of an axis at an early stage.
The parameter is set to TRUE to activate Motion Monitoring, otherwise no monitoring takes place.
The Motion Monitoring Window defines the distance that the encoder (actual position) should be expected to
travel during one cycle of the NC SAF task. Here a value/distance/length of some encoder increments can
be set.
Monitoring starts as soon as the axis executes a motion command and ends when the axis comes to a
logical standstill. If its actual position does not change by more than the Motion Monitoring Window in at least
one NC cycle during the Motion Monitoring Time, the NC axis outputs the error 0x435D.
Reduced (iterated): The override is based on the maximum velocity of the profile calculated by the setpoint
generator. Confer to parameter description at “MOTION | NC-Task 1 SAF | Axes | Axis 1 | Maximum
Dynamics | Maximum Velocity [} 72]”.
Original (iterated): The override is based on the maximum parameterized velocity of the actual command
currently performed. Thus, it can happen that e.g. 80 percent override and 100 percent override result in the
same nominal velocity.
Look at section Path Override (Interpreter Override Types) [} 110] for more information on path override.
The Rapid Traverse Velocity is used, when a G0 interpreter command is running. Look at section Rapid
Traverse [} 112] for a short description of the G0 interpreter command.
Segment Transitions
Segments are geometrical objects. We regard them as curves in terms of differential geometry that are
parameterized by their arc length.
A segment transition from a segment S_in to a segment S_out is classified in geometrical terms as type
Ck. Thereby, k is a natural number (including 0) describing k continuous arc length differentials for each
segment and corresponding k^th derivatives at the transition point.
C1 transitions: Appear smooth, but are not smooth in dynamic terms. At the segment transition point there is
a step change in acceleration.
C2 transitions: Are dynamically smooth their smoothness merely being restricted by jerk.
Segment Dynamics
Velocity v: The segment setpoint velocity v changes from v_in to v_out at the segment transition. At the
segment transition the setpoint velocity is always reduced to the lower one of the two values.
Acceleration a: At the segment transition the current path acceleration is always reduced to zero.
Jerk j: At the segment transition the jerk changes according to the segment transition geometry. This jerk
change can cause significant step change in dynamics.
Several reduction methods are available for C0 transitions. One of them is the VELOJUMP reduction
method. The VELOJUMP reduction method reduces the velocity after permitted step changes in velocity for
each axis.
Basically, v_link = min(v_in, v_out). For the axis [i] the permitted absolute step change in velocity
is v_jump[i] = C0[i] * min(A+[i], -A-[i]) * T. Thereby, C0[i] is the reduction factor, A+[i],
A-[i] are the acceleration or deceleration limits for the axis [i] and T is the cycle time. The VELOJUMP
reduction method ensures that the path velocity at segment transition v_link is reduced, whereby the
absolute step change in the axis setpoint velocity of axis [i] is at most v_jump[i]. Nevertheless, v_min
has priority: If v_link is less than v_min, v_link is set to v_min. In case of movement reversal with no
programmed stop there will be a step change in axis velocity.
Position Correction
The Position Correction can be activated at MOTION | NC-Task 1 SAF | Axes | Axis 1 | Parameter.
Alternatively, the Position Correction can be activated at MOTION | NC-Task 1 SAF | Axes | Axis 1 | Enc |
Parameter.
The variable axis.PlcToNc.PositionCorrection is of data type LREAL and belongs to the structure
PLCTONC_AXIS_REF. If Position Correction is enabled, this variable adds an additional offset onto the target
position. Note, that this correction does not affect software limits.
The filter time for the PT-1 filter that filters variations within the Actual Position Correction with the filter time
set here. Consult section PT1 Filter [} 112] for more information on a PT1 filter.
See also:
MC_PositionCorrectionLimiter
• TwinCAT 3 PLC Lib: Tc2_MC2
Backlash
This parameter remain merely for compatibility issues. See NC Backlash Compensation for further
information.
The delay time by that error propagation for the slave axis will be delayed if ‘DELAYED’ is selected as Error
Propagation Mode.
When within runtime an error appears at a slave axis the corresponding master axis will be set to error state
not before the time assigned here has ellapsed. A state of interest of the slave axis, in particular its error
state, can be watched by PLC code. Thus, the erroneous slave axis may be uncoupled to safely prevent the
whole axis combine from falling into error state.
TRUE: Coupled. The slave axis will follow the actual master position while and even though the master is
disabled.
The coupled slave axis follows the master axis within the Velocity Window. When velocity deviations beyond
the Velocity Window exceed the Filter Time for Velocity Window, an error will be thrown.
Generally speaking, an axis is in PTP mode for the whole time. The point is to transform a slave axis into a
master axis indirectly. Thus, it is uncoupled implicitly without PLC code having to engage MC_GearOut.
TRUE: To the slave axis a PTP command can be triggered without having to set the axis into PTP mode
before.
FALSE: Before a PTP command can be triggered to the slave axis, the slave axis has to be set into PTP
mode.
FALSE: Before a PTP command can be triggered to the external setpoint axis, the external setpoint axis has
to be set into PTP mode.
TRUE: To the external setpoint axis a PTP command can be triggered without having to set the axis into PTP
mode before.
This parameter remains merely for compatibility issues. Do not use it within new projects.
Data Persistence
Depending on their operating modes encoders determine the actual position, actual velocity or actual
acceleration or deceleration. Regularly, actual values fluctuate intemperately. So, for each mode a
parameterizable filter is available to ensure a reasonable resolution.
A wide variety of encoder versions is supported. Available are absolute and incremental encoders.
Furthermore, there are simulation encoders and there are special encoders for the determination of force.
The encoder parameters include scaling, zero offset shift and the modulo factor. There are encoder
parameters for software end locations and for reference travel.
At “MOTION | NC-Task 1 SAF | Axes | Axis 1 | Enc” the file card Parameter displays the parameter groups
• Encoder Evaluation,
• Limit Switches,
• Filter,
• Homing,
• Other Settings.
If set TRUE, the parameter Invert Encoder Counting Direction inverts the counting direction of the encoder.
• FALSE: The polarity of the axis movement agrees with the counting direction of the acquisition
hardware.
• TRUE: The polarity of the axis movement is opposite to the counting direction of the acquisition
hardware.
WARNING
Risk of Unexpected Movements
If the encoder counting direction and the motor polarity do not match with each other, the axis will make
unexpected movements.
The scaling factor is subdivided into a numerator and a denominator. It converts displacement increments
into axis positions or calculates a user unit out of encoder increments.
Position Bias
The position bias is an offset used for absolute encoders to align their position within the machine coordinate
system and thus to specify the machine-dependent zero point. Thereby, the position bias offset value is
added to the encoder position to determine the axis position.
The value of the Modulo Factor (e.g. 360.0°) is the value to calculate modulo turns and modulo positions out
of the absolute axis position. For rotating axes the Modulo Factor is the “distance” represented by one
rotation. For instance, 360.0° should be entered here, if the actual rotational value is acquired in degrees.
The Tolerance Window for Modulo Start should be big enough to allow backward movements, if a modulo
forward command is running inside the window area. Vice versa, the Tolerance Window for Modulo Start
should be big enough to allow forward movements, if a modulo backward command is running inside the
window area.
Further Information:
• Notes on modulo positioning (PLC library Tc2_MC2)
The encoder mask defines the number of allowed increments until the feedback value flows over. Thereby,
the increments are not the real encoder increments.
The encoder submask defines the number of increments per motor turn.
Setting a level this parameter creates artificial noise for the simulation axis to make it appear more realistic.
Reference System
Use the Reference System parameter to select how the encoder values should be interpreted:
INCREMENTAL
INCREMENTAL mode does not use absolute characteristics of the physical feedback system, but can be
used with both incremental and absolute encoder systems. After starting the control, homing is required to
initialize the actual position of the axis.
This mode extends the INCREMENTAL mode and can be used instead.
If in this mode the retain data of the NC-SAF task and the axis parameter Data Persistence are activated, the
system starts up with the last stored position. If a single-turn absolute encoder is used at the same time, a
deviation of up to half an encoder revolution is also taken into account and the axis can be operated within
these limits without homing. The absolute range of the encoder system is defined by the parameter Encoder
Sub Mask.
ABSOLUTE
The ABSOLUTE mode can be used with multi-turn absolute encoder systems. The prerequisite is that the
encoder system or the motor is installed in such a way that there can't be overflow of the position feedback
within the travel path. An overflow would be acknowledged with a runtime error.
The ABSOLUTE MULTITURN RANGE mode can also be used with multi-turn absolute encoder systems.
The encoder system can be installed in any way, so that a maximum of one overflow may occur in the travel
path. To ensure correct evaluation, the two end positions must be parameterized.
The total travel path must be less than the absolute range of the encoder. The absolute range of the encoder
system is defined by the parameter Encoder Mask.
The ABSOLUTE SINGLETURN RANGE mode can be used with single-turn absolute encoder systems. The
encoder system can be installed in such a way that an overflow is located in the travel path. To ensure
correct evaluation, the two end positions must be parameterized.
The total travel path must be less than the absolute range of the encoder, i.e. less than one encoder
revolution. The absolute range of the encoder system is defined by the parameter Encoder Sub Mask.
ABSOLUTE (modulo)
The ABSOLUTE (modulo) mode can be used when the travel path of an axis exceeds the absolute range of
the encoder system. For example, in the case of an endlessly running conveyor belt.
To initialize the position of the axis correctly at system start, the retain data of the NC-SAF task and the
parameter Data Persistence of the axis must be activated. Furthermore, the parameter Modulo Factor of the
encoder of the NC axis must be parameterized correctly. The axis position is initialized to this module range
after the system startup.
When switched off, the axis may be mechanically displaced by a maximum of half of the absolute range.
This maximum distance is defined by the Encoder Sub Mask parameter. The Encoder Sub Mask is typically
set to the increments of one motor revolution, but can also be set to the entire absolute range here.
Limit Switches
The Limit Switches parameters can be set at MOTION | NC-Task 1 SAF | Axes | Axis 1 | Parameter.
Alternatively, the Limit Switches parameters can be set at MOTION | NC-Task 1 SAF | Axes | Axis 1 | Enc |
Parameter.
Minimum Position
Lower position boundary for the axis not to be descended when the Soft Position Limit Minimum Monitoring
is activated. Commands that violate this lower boundary are rejected.
Maximum Position
Upper position boundary for the axis not to be exceeded when the Soft Position Limit Maximum Monitoring is
activated. Commands that violate this upper boundary are rejected.
7.2.3 Filter
In the case of very noisy encoder signals, it may therefore be necessary to filter the position value with a low
filter time.
See section PT1 Filter [} 112] for further information on the PT1 filter.
7.2.4 Homing
Homing refers to an axis initialization run during which the correct actual position is determined by means of
a reference signal. This can be NC-guided, as described here.
Alternatively, there is also drive-guided homing, which is performed independently by a suitable drive without
the influence of the control system. For details, please refer to the documentation of the drive system used.
Procedure
Parameterization
For the default homing sequence the direction for calibration cam search can be inverted.
• FALSE: cam is looked for in the direction of positive movement.
• TRUE: cam is looked for in the direction of negative movement.
For the default homing sequence the direction for sync pulse search can be inverted.
• FALSE: sync pulse is looked for in the direction of positive movement.
• TRUE: sync pulse is looked for in the direction of negative movement.
The Home Position is the position value that will be assigned to the axis when the sync pulse appears within
the homing. This is done exactly with the sync pulse while in motion. Since the axis then stops, the standstill
position deviates from the parameterized value. The referencing is nevertheless exact.
The parameter Reference Mode offers the opportunity to select which signal shall be used for sync impulse
search:
• ‘Default’ / ‘Homing Sensor Only (PLC cam or digital input 1..8)’
◦ The simplest way of referencing an axis where only the cam signal is evaluated. Another sync
signal is not used, so this setting should only be selected if the axis does not offer more extensive
options.
• ‘Hardware Sync (Feedback reference pulse)’
◦ Some encoder systems provide a sync pulse per revolution (zero track) in addition to the count.
The homing precision can be enhanced by selecting this mode, if the encoder evaluation logic is
able to pick up the sync pulse. The precision is comparable with Software Sync. Hardware Sync
mode may require parameterization or special wiring of the drive or encoder system.
• ‘Hardware Latch 1 (pos. edge)’, ‘Hardware Latch 1 (neg. edge)’
◦ Hardware latch responds to an external latch signal in addition to the cam signal. For this purpose,
the latch mechanism must be configured in the drive and the latch input must be wired.
• ‘Software Sync’
◦ Software Sync mode enhances the homing precision by additionally detecting the encoder count
overflow after an encoder or motor revolution, after the reference cam signal has been detected.
This mode requires a part-absolute encoder (e.g. resolver) with constant overflow interval relative
to the reference cam. Overflow detection is parameterized via the Reference Mask parameter.
• ‘Application (PLC code)’
◦ In this case, the entire homing procedure must be programmed in the PLC:
In this case, the NC sets bit 23 in the "NcApplicationRequest" status, which is polled by the PLC.
Via MC_ReadApplicationRequest the request of the NC can be determined in the PLC. So far only
0 = NONE and 1 = HOMING is supported (see 0x33 at "Index offset" specification for axis
parameter). In the case of homing, the PLC can perform the sequence itself by moving the axis.
Further information
• Homing on the AX5000
• MC_Home in the Tc2_MC2
Encoder Mode
The parameter Encoder Mode offers the opportunity to select which values shall be calculated from the
encoder position:
• ‘POS’: The actual position is determined.
• ‘POSVELO’: The actual position and the actual velocity are determined.
• ‘POSVELOACC’: The actual position, the actual velocity and the actual acceleration are determined.
Position Correction
The Position Correction can be activated at MOTION | NC-Task 1 SAF | Axes | Axis 1 | Parameter.
Alternatively, the Position Correction can be activated at MOTION | NC-Task 1 SAF | Axes | Axis 1 | Enc |
Parameter.
The variable axis.PlcToNc.PositionCorrection is of data type LREAL and belongs to the structure
PLCTONC_AXIS_REF. If Position Correction is enabled, this variable adds an additional offset onto the target
position. Note, that this correction does not affect software limits.
The filter time for the PT-1 filter that filters variations within the Actual Position Correction with the filter time
set here. Consult section PT1 Filter [} 112] for more information on a PT1 filter.
See also:
MC_PositionCorrectionLimiter
• TwinCAT 3 PLC Lib: Tc2_MC2
The drive transfers the output voltage to the power section of the motor. A wide variety of drive versions is
supported: E.g. servo drives, low speed drives, high speed drives, stepper motor drives. The drive
parameters include the motor polarity and the reference speed.
Analog Drive
Within this context analog does not mean that the speed is represented by a voltage (e.g. ±10 V) or a current
(e.g. ±20 mA), but rather that the axis can be adjusted over an effectively continuous range of values. This
kind of adjustment is also possible for drives with digital interfaces such as the BISSI Terminals of type
KL5051. Employing such a digital interface a speed can be adjusted like controlling an analog value, even
though being transported in the form of digital information.
At “MOTION | NC-Task 1 SAF | Axes | Axis 1 | Drive” the file card Parameter displays the parameter groups
• Output Settings,
• Position and Velocity Scaling,
• Torque and Acceleration Scaling,
• Valve Diagram,
• Other Settings.
may appear.
If set TRUE, the parameter Invert Motor Polarity inverts the polarity of the motor and thus inverts the direction
of motor rotation.
• FALSE: In response to positive drive the axis moves in the direction of larger positions.
• TRUE: In response to positive drive the axis moves in the direction of smaller positions.
WARNING
Risk of Unexpected Movements
If the encoder counting direction and the motor polarity do not match with each other, the axis will make
unexpected movements.
Habitually, the drive parameter Output Scaling Factor (Position) does not evoke an effect. In principle, to
avoid to infer its future use the user should not change the default value 1.0 of this parameter.
The positional output scaling is already set by the encoder input scaling. Regularly, the positional input
scaling equals the positional output scaling for a drive. For this reason, the drive parameter Output Scaling
Factor (Position) is currently not evaluated. Instead, solely the encoder parameters Scaling Factor
Numerator and Scaling Factor Denominator do the scaling work and have to be adjusted for accurate
scaling.
When a drive controler operates in velocity precontrol mode, the NC output value has to be scaled. To do
this scaling there are two possibilities whose choice depends on the type of the employed drive controller.
Following, a tabular comparison shows, when the Reference Velocity parameter or the Output Scaling Factor
(Velocity) parameter has to be applied.
M2400_DAC1 x
M2400_DAC2 x
M2400_DAC3 x
M2400_DAC4 x
KL4XXX x
KL4XXX_NONLINEAR x
TWOSPEED x
STEPPER x
SERCOS x
KL5051 x
AX2000_B200 x
SIMO611U x
UNIVERSAL x
NCBACKPLANE x
CANOPEN_LENZE x
DS402_MDP742 x
AX2000_B900 x
AX2000_B310 x
AX2000_B100 x
KL2531 x
KL2532 x
TCOM_DRV x
MDP_733 x
MDP_703 x (x)*
*
Also possible, but should be regularly left on the value 1.0.
The output of the velocity value can be delayed by the Output Delay (Velocity) time.
To limit velocity and thus to protect hardware a lower output limit can be set for driving the axis. If just a part
of the output data type is valid it is necessary to limit the minimum output value. The Minimum Drive Output
Limitation is a directionally dependend limitation of the total output. The value 1.0 corresponds to unlimited
output of 100%. Typically, using this parameter one refers to a velocity output signal for the drive in
connection with position control. In exceptional cases the application of this parameter may refer to a torque
value or a current value.
To limit velocity and thus to protect hardware an upper output limit can be set for driving the axis. If just a
part of the output data type is valid it is necessary to limit the maximum output value. The Maximum Drive
Output Limitation is a directionally dependend limitation of the total output. The value 1.0 corresponds to
unlimited output of 100%. Typically, using this parameter one refers to a velocity output signal for the drive in
connection with position control. In exceptional cases the application of this parameter may refer to a torque
value or a current value.
This group of parameters creates an optional acceleration as a servo control that is supposed to act before a
lag distance evolves. It may set e.g. a torque value.
Time for the P-T1 filter. This time comes as an input to the P-T1 filter.
Derivative of the actual torque to be scaled. This derivative comes as an input to the P-T1 filter.
Consult section PT1 Filter [} 112] for more information on a PT1 filter.
The output of the torque value can be delayed by the Output Delay (Torque) time.
Sometimes an optional output scaling for acceleration is needed. (E.g. for NC acceleration feedforward.
Consult section Acceleration Feedforward [} 108] for more information on acceleration feedforward.)
The output of the acceleration value can be delayed by the Output Delay (Acceleration) time.
Within this section cam tables are employed to construct linear position coupling. Thus, for numerical control
e.g. a hydraulic axis may be treated similarly to a servo axis.
A cam plate is a relation R that describes non-linear position coupling between a master axis and a slave
axis:
• y = R(x),
• x-axis: master axis position,
• y-axis: slave axis position.
This relation is stored within a valve diagram table. Within this table the number pairs (x, y) are discrete.
Each valve diagram table has its own identification number Id. It is assigned serially to each table. The table
Id uniquely identifies the cam plate in the TwinCAT system.
can be selected to join the discrete number pairs (x, y) within the valve diagram table.
This parameter allows to adjust a zero transition of a position coupling curvature through the origin. Thus,
e.g. a hysteresis branch can be adjusted to run through the origin.
Employing a cam plate relation some simple types of hydraulic axes can be controlled like servo axes. For
more intricate types of hydraulic axes follow
to find information on controlling them with the TwinCAT PLC Hydraulics Library.
When
• ‘OFF (default)’
As filter types
• ‘Moving Average’ or
• ‘P-Tn’
‘Moving Average’: As an output the Moving Average Filter creates an average over a set of position
setpoint values that comes as an input to the filter. Thereby, the Smoothing Filter Time prescribes the time
interval over that the average spans. Values of the input set are created by position setpoint generation.
Thus, the value generation frequency is determined by the cycle time of the task generating the setpoint
values.
When a new value is generated e.g. each 1ms and the Smoothing Filter Time is set to e.g. 20ms an average
is taken over 20 values. Thereby, the influence of a setpoint value is perceptible for 20ms.
‘P-Tn’: As an output the P-Tn Filter creates an average over a set of position setpoint values that comes as
an input to the filter. Thereby, the Smoothing Filter Time prescribes the time constant of the P-Tn Filter.
Values of the input set are created by position setpoint generation. Thus, the value generation frequency is
determined by the cycle time of the task generating the setpoint values.
Smoothing Filter
In some applications position command output smoothing is used to reduce vibrations of machine parts. This
smoothing forms an additional filter that should be handled with care. This filter cannot be compensated by a
static dead time.
Some C1D errors of the hardware drive can be delayed by setting this parameter to ‘IGNORE SELECTED
ERRORS’.
Drive Mode
Currently, there is merely one drive mode, the ‘STANDARD’ drive mode. In principle, other modes are
imaginable implementing a more open system.
This value is added to the drive control level. In this way, a constant offset can be added to the output to
compensate zero errors in analog drives, for instance.
Confer section Automatic DAC Offset Adjustment [} 108].
Following Error
The Following Error is equal to the Lag Distance, also called Position Lag Error.
Following error calculation can be done with the NC or inside the hardware drive. For all hardware drives
working in position control mode the calculation should be done externally on the hardware drive.
‘Extern’: The Following Error Calculation is done within the drive controller externally.
The purpose of the controller is to operate on the basis of setpoint velocities or other setpoint magnitudes
(e.g. acceleration) and on the basis of setpoint magnitude differences as following errors. Controller
operation is performed in a way to keep following errors as small as possible and to prevent any axis to
undergo any overshots in position or velocity.
Supported is a wide variety of controller versions: Servo position controllers and special controllers for
particular axis types.
Controller Types
• Position Controllers: Control the actual position to follow the setpoint position as precisely as possible.
Position controller P, following error proportional controller, position controller with two P constants,
following error proportional controller with different constants for the stationary state and for movement,
position PID-T1 controller with proportional acceleration feed forward.
• Controllers for Axes: Servo axes, stepper motors, low-speed axes, high-speed axes.
At “MOTION | NC-Task 1 SAF | Axes | Axis 1 | Ctrl” the file card Parameter displays the parameter groups
• Monitoring,
• Position Control Loop,
• Other Settings.
may appear.
The following table lists the available controller types and shows what parameters configure (“x”) or do not
configure (“-”) each one of them.
(Position by SERCOS)
Two speed controller
velocity PI controller
Position controller P
SERCOS controller
Stepper controller
Position controller
Position P and
Position P and
(with Ka)
(Torque)
Monitoring: x x x x x x x x
Position Lag Monitoring x x x x x x x x
Maximum Position Lag Value x x x x x x x x
Maximum Position Lag Filter Time x x x x x x x x
Position Control Loop: x x x x x x x x
Position control: Dead Band Position Deviation - x x - x - - -
Position control: Proportional Factor Kv x - x x x - - -
Position control: Proportional Factor Kv (standstill) - x - - - - - -
Position control: Proportional Factor Kv (moving) - x - - - - - -
Position control: Integral Action Time Tn - - x - - - - -
Position control: Derivative Action Time Tv - - x - - - - -
Position control: Damping Time Td - - x - - - - -
Position control: Min./max. limitation I-Part [0.0 … 1.0] - - x - - - - -
Position control: Min./max. limitation D-Part [0.0 … 1.0] - - x - - - - -
Disable I-Part during active positioning - - x - - - - -
Position control: Velocity threshold V dyn [0.0 … 1.0] - x - - - - - -
Feedforward Acceleration: Proportional Factor Ka - x x x x - - -
Feedforward Velocity: Pre-Control Weighting [0.0 … 1.0] x x x x x x x x
Velocity Control Loop: - - - x x - - -
Velocity control: Proportional Factor Kv - - - x x - - -
Velocity control: Integral Action Time Tn - - - x x - - -
Velocity control: Derivative Action Time Tv - - - x - - - -
Velocity control: Damping Time Td - - - x - - - -
Velocity control: Min./max. limitation D-Part [0.0 … 1.0] - - - x - - - -
Velocity control: Min./max. limitation I-Part [0.0 … 1.0] - - - x x - - -
Observer: - - - - x - - -
Velocity Filter: Time Constant T - - - - x - - -
Observer Mode - - - - x - - -
Motor: Torque Constant Kt - - - - x - - -
Motor: Moment of Inertia Jm - - - - x - - -
Bandwidth f0 - - - - x - - -
Correction Factor Kc - - - - x - - -
Other Settings: x x x x x x x x
Controller Mode x x x x x x x x
Auto Offset x x - - - - - -
Offset Timer x x - - - - - -
Offset Limit (of Calibration Velocity) x x - - - - - -
Slave coupling control: Proportional Factor Kcp x x x - - - - -
Controller Outputlimit [0.0 … 1.0] x x x x x - - -
7.4.1 Monitoring
When position lag monitoring is performed, the Position Lag Error is monitored, and if prescribed limits of
position and time are exceeded, a runtime error is thrown.
The Position Lag Monitoring parameters can be set at MOTION | NC-Task 1 SAF | Axes | Axis 1 |
Parameter.
Alternatively, the Position Lag Monitoring parameters can be set at MOTION | NC-Task 1 SAF | Axes | Axis 1
| Ctrl | Parameter.
Maximum Position Lag Value and Maximum Position Lag Filter Time
The Maximum Position Lag Value is the upper boundary for the permitted position lag error not to be
exceeded for a time longer than the Maximum Position Lag Filter Time when the Position Lag Monitoring is
activated. Otherwise, the NC axis will be stopped instantaneously by a zero voltage output and the NC axis
will be placed into the logical “error” state throwing the error 0x4550.
In contrast to position control in the drive device, in TwinCAT Dead Band Position Deviation is only effective
for position control if, for example, the velocity interface to the drive is configured. It defines a range in which
the controller is inactive. This parameter is a symmetrical window based on the assumption that the position
lag error with respect to the position control (position control deviation) within this window is zero. Position
control is therefore disabled within the window.
This functionality is required because certain axes and mechanical systems may cause a stationary
oscillation around the target position. The parameter can be used to enforce "calm". The parameterizable
deviation around the exact target position is accepted.
There are axes that are not capable of position control or have insufficient holding torque around standstill,
so that a certain inaccuracy around the target position is accepted.
For other real effects, such as pronounced static friction (with tear-off torque) or pronounced slack, dead
band position deviation can also be used to enforce "calm" for an accepted accuracy.
The Proportional Factor Kv is the proportional gain factor of the P component of the P-controller. Output
velocity = feed forward velocity + Kv * following error.
The Proportional Factor Kv (standstill) Kvs is the proportional gain factor of the P component of the P-
controller, when the axis stands stationarily still. Output velocity when stationary =
feedforward velocity + Kvs * following error.
The Proportional Factor Kv (moving) Kvf is the proportional gain factor of the P component of the P-
controller, when the axis is moving. Output velocity when moving = feedforward velocity +
Kvf * following error.
and a velocity threshold vdyn to define a function for a velocity dependent kv factor. When the value of the
quotient “setpoint velocity / reference velocity” resides within the velocity threshold interval [- vdyn … + vdyn]
the gain factor of the P-controller is linearly interpolated from the proportional factor Kv (moving) Kvf
towards the proportional factor Kv (standstill) Kvs at zero velocity. The diagram below illustrates the
connections.
The sample is parameterized with Kvs = 50, Kvf = 10 and v_dyn = 0.2.
The acceleration feedforward proportional factor Ka is the gain factor when NC acceleration feedforward
control is used. Output velocity component = Ka * setpoint acceleration.
Consult section Acceleration Feedforward [} 108] for more information on Acceleration Feedforward.
This parameter is a relative weighting of the feedforward. Thereby, the default parameter value 1.0
corresponds to 100% feedforward weighting. Velocity feedforward precontrol weighting can be reduced to
avoid an overshot in position.
7.4.4 Observer
Observer Mode
As an Observer Mode
• ‘OFF’ or
• ‘LUENBERGER’
can be selected. The Observer Mode implements an observer model for determining velocities.
Bandwidth f0
Correction Factor Kc
Controller Mode
Auto Offset
The auto offset parameters merely influence the behavior of the P-controller and the PP-controller. To
activate the
• Offset Timer
and the
• Offset Limit (of Calibration Velocity)
The auto offset parameters are designed for an analog axis interface. A real axis may not be fully stopped at
a zero velocity setpoint, but may drift slightly. This drift behavior may be due to offset problems, temperature
problems or other reasons. The auto offset is supposed to act as an adaptive and automatic offset
coordination to compensate slight drifts and thus to prevent the axis from drifting apart. On digital interfaces
the auto offset has no effect.
The automatic offset adjustment calculates and activates a DAC offset that minimizes the following error in
the position control.
Confer section Automatic DAC Offset Adjustment [} 108].
Offset Timer
For a P-controller or for a PP-controller within the interval [- Offset limit … + Offset limit] the offset will
automatically be adjusted. A relative control. At a limit the offset is kept constant not going beyond it.
This parameter influences merely the control loop in TwinCAT NC. The slave coupling control proportional
factor Kcp is the gain factor for an additional P-controller. This P-controller is trying to minimize the difference
of master and slave position lag to enhance the accuracy.
Controller output limit can be set within the interval [0.0 … 1.0].
Offset filter time: Data type Double. Unit sec. Time constant for the offset adjustment.
Offset limit: Data type Double. A relative control. At a limit the offset is kept constant not going beyond it.
Quite possibly, the behavior of the offset adjustment could be affected at runtime. Suitably, a range of
“switches” is available: For instance, at runtime the PLC or another ADS device can modify time constant
parameters or feedforward limit parameters.
The offset adjustment could be switched off entirely. Doing so, it is not always possible to avoid a jump in the
output voltage. Therefore, a soft deactivation can be achieved with the “fade out” mode. A fade out reduces
the adjustment to zero over time while following its own curve. To keep the adjustment steady for a period of
time the “hold” mode can be activated. E.g., the “hold” mode is suitable when stopping the power section of a
drive temporarily. Performing such a stop it would be impossible for the offset not to run out of control if the
offset adjustment was to remain active.
The boolean variable axis.Status.Error displays the StateDWord bit 31 and refers to the axis error
state. When the boolean variable axis.Status.Error is TRUE, it indicates that there is an error for the
axis.
The variable axis.Status.ErrorID of data type UDINT refers to the error ID of the reported error and
displays the axis error code.
7.5.4 AXIS_REF
PROGRAM MAIN
VAR
axis: AXIS_REF;
END_VAR
axis.ReadStatus();
MC axis variable
The PLC axis variable MAIN.axis has the data type AXIS_REF.
7.5.5 NC
TwinCAT NC is an assembly of function groups used for the control and regulation of axes or of
synchronized axis groups. An NC task consists of one or more channels of type PTP channel, FIFO channel
or NCI channel, and their subsidiary parts. Generally, immediately after start-up the NC axes find themselves
in one or more PTP channels. Particularly, they are moved to a different channel through a process of
reconfiguration then, if necessary.
The parameterization takes place in the interpolation channel under the group parameters.
Because of the relevant dynamic parameters (braking distance, acceleration etc.) it is not possible for the
programmed velocity, depicted by the blue line, to be achieved in every segment. For this reason, for each
geometric segment a velocity, depicted by the red line, is calculated that may possibly be reduced compared
to the programmed velocity. In the standard case, the override is made with reference to this possibly
reduced segment velocity.
The advantage of this override type is that the machine operates with an approximately linear reduction in
velocity when override values are small. Therefore, “Reduced (iterated)” is the correct setting for most
applications:
The override value is based on the velocity programmed by the user. The maximum segment velocity has
merely a limiting effect.
Based on internally reduced velocity with the option to specify a value greater than 100%.
Generally, the override type behaves like “Reduced (iterated)”. More specifically, with this override type it is
possible to travel along the path more quickly than programmed in the G-Code. There is no limitation to
120%, for example. The maximum possible path velocity is limited by the maximum velocities of the axis
components (G0 velocity) and their dynamics.
If limitation to a particular value, e.g. 120%, is required, this limitation can be set within the PLC project.
7.5.7 PTP
PTP stands for point-to-point. PTP axis functionality is a control process for one-dimensional positioning of
axes, in particular servo axes, but also other types of axes. One-dimensional does not necessarily mean
linear. It simply means that one component is interpolated in some specified coordinate system (Cartesian
coordinates, polar coordinates).
PTP is a licence level for basic axis numerical control. PTP forms the basis of the whole of TwinCAT NC,
because at system start-up the axes are normally in PTP mode, and thus are position controlled. The
extended TwinCAT NC functionalities are achieved on the basis of the PTP modes by reconfiguration (FIFO,
NCI) or by coupling (all slave types).
• Rapid traverse is used to position the tool quickly, and is not to be used for machining the workpiece.
With G0 the axes are moved with linear interpolation as fast as possible. The velocity is calculated with
MIN (Rapid Traverse Velocity (G0), Reference Velocity, Maximum Velocity).
• If a number of axes are to be driven in rapid traverse the velocity is determined by that axis that
requires the most time for its movement.
• An accurate stop (G60) is cancelled with G0.
• The rapid traverse velocity is set for each axis individually at “MOTION | NC-Task 1 SAF | Axes | Axis 1
| NCI Parameter | Rapid Traverse Velocity (G0)”.
7.5.10 ReadStatus()
See section AXIS_REF [} 109].
[1]
[2]
[3]
[4]
Motivation
Dynamical- • Segment transitions that are not two times steadily differentiable with respect to
Steadiness their spatial coordinate lead to dynamic-unsteadinesses, if at this transition the path
velocity is not reduced to zero value.
• Segment transitions can be smoothed out using Bézier-splines leading to the dy-
namics for the whole path to be steady at the segment transition, even though path
velocity differs from zero.
Smoothening • Tolerance balls are used to smooth out dynamic unsteadiness at segment transi-
tions.
Definition
Segment Transition • For the smoothening a tolerance ball is placed around each segment transition.
Permitted • Up to the extend that the path stays within the tolerance ball, this path may deviate
Path Deviation from its predefined geometry within this tolerance ball.
Parameter
Range of Validity
No • The radius of the tolerance ball is valid modally for all segment transitions that at
Exact Halt, the segment transition do not imply an exact halt or a stop.
No Stop
Algorithmic Behavior
Adaptive • Automatically, the radii of the tolerance balls are set adaptively.
Inhibit • Setting the radii adaptively prevents from overlap of the tolerance balls. Otherwise,
Overlap especially for small segments an overlap of tolerance balls could occur.
8 First steps
The necessary steps for creating a project, moving an axis and analyzing this movement are explained in the
following.
DANGER
Acute risk of injury when using real axes
• Only specialist personnel with extensive knowledge in the areas of electrical engineering / drive
technology are allowed to install and commission the equipment.
• Check that all live connection points are protected against accidental contact.
• Never undo the electrical connections to the motor when it is live.
• The surface temperature of the motor can exceed 100 °C in operation. Check (measure) the
temperature of the motor. Wait until the motor has cooled down below 40 °C before touching it.
• Make sure that, even if the drive starts to move unintentionally, no danger can result for personnel or
machinery.
Next step
The creation of the axis with real drive hardware can be done manually as well as automatically and is
explained below using the example of an AX5000. The steps can also be transferred to other servo drives:
• Create AX5000 and NC axis manually [} 124]
• Create AX5000 and NC axis automatically [} 119]
ð The NC/PTP NCI Configuration [} 14] is now below the Motion node.
4. Axes can be added to the configuration with a right click on Axes > Add New Item.
5. For a simulation axis, select the type Continuous Axis and confirm your selection with OK.
Details on the axis types can be found here [} 19].
ð A simulation axis is created. You can recognize it by the fact that no link to the I/O is listed in the axis
dialog Settings [} 20] and the axis type Standard (Mapping via Encoder and Drive) is selected.
Details about the axis dialogs can be found here [} 20].
Alternative steps
Next steps
Requirements:
• Control voltage: 24 VDC
• EtherCAT connection with master card
• TwinCAT in Config Mode
Scan Devices
1. First the bus is scanned for connected EtherCAT devices.
2. Confirm the hint that not all device types can be found automatically.
Scan Motors
5. Beckhoff motors with integrated name plate can be automatically detected and added to the
configuration. To do this, confirm the "Scan Motors" message with Yes.
If you do not use a corresponding motor, please perform this step using the documentation for setting up
an AX5000 manually.
ð The detected feedback system and the detected motor are displayed at the following location: Drive
> Drive Manager > Channel > Configuration > Motor and Feedback
The scan step can also be restarted via the button Scan feedback 1 / motor*.
The TwinCAT 3 Drive Manger 2 (TE5950) also provides a commissioning tool for Beckhoff Drive
Technology. With this you can read the connected motors again. It also supports you during
parameterization and configuration.
ð If there was no NC configuration in the project yet, it has now been created.
ð Axis objects corresponding to the drive were automatically created in the NC configuration and
ð the axis objects were automatically linked to the drive scanned under I/O.
7. Afterwards, you will be asked if you want to activate Free Run. This is not mandatory for the next steps,
so the question may be answered as you wish with Yes or No.
Alternative steps
• Create simulation axis [} 117]
• Create AX5000 and NC axis manually [} 124]
Next steps
Requirements
• TwinCAT is in ConfigMode
Create Devices
1. Click the path I/O > Devices > Add New Item...
6. In the Insert EtherCAT Device dialog, select the AX5000 actually used and confirm with OK.
If you have acknowledged the query with Cancel, you can create and link the NC configuration and axis
objects manually.
1. To do this, first carry out the steps as for Creating a simulation axis [} 117].
2. At Axis > Settings > Axis Type, select SERCOS Drive.
3. The NC axis must be linked to the channel of the AX5000 under I/O. To do this, click Axis > Settings >
Link To I/O....
ð The dialog Select I/O Box/Terminal opens.
4. Select the channel of your AX5000 to which you want to link the NC axis.
ð The NC axis is linked to the drive channel.
5. Via Select motor* you get to the following dialog. Select the motor and confirm with OK.
6. Select the power supply of the motor and confirm with OK.
ð Now adjustments can be made automatically to the NC axis. Please note the points mentioned at
Axis configuration [} 129].
ð Feedback system and motor are configured.
Alternative steps
• Create simulation axis [} 117]
• Create AX5000 and NC axis automatically [} 119]
Next steps
If the software limit switch monitoring is activated for the axis, the axis does not move beyond the set
position (max./min. end position).
Activation steps:
1. Select the NC axis for which you wish to activate the software limit switches.
2. Open the Parameter dialog for this NC axis.
3. Set the value TRUE for the parameter Limit Switches: Soft Position Limit Minimum Monitoring.
Use the corresponding drop-down box in the table column Offline Value.
4. Set the value TRUE for the parameter Limit Switches: Soft Position Limit Maximum Monitoring.
Use the corresponding drop-down box in the table column Offline Value.
5. Use the Limit Switches: Minimum Position parameter to set a value for the smallest position value that
can be approached that allows sufficient freedom of movement and excludes the possibility of a collision.
6. Use the Limit Switches: Maximum Position parameter to set a value for the largest position value that
can be approached that provides sufficient freedom of movement and eliminates the possibility of a
collision.
ð With the next Activate configuration [} 130] you have activated the software limit switches for the
selected NC axis.
The position lag monitoring function checks whether the current position lag of an axis has exceeded the
limit value. The lag distance is the difference between the set value (control value) and the actual value
reported back. Here, monitoring takes place both at standstill and during the movement of an axis.
Activation steps:
1. Select the NC axis for which you want to activate position lag monitoring.
2. Open the Parameter dialog for this NC axis.
3. Set the value TRUE for the parameter Monitoring: Position Lag Monitoring.
Use the corresponding drop-down box in the Offline Value table column.
4. Use the Monitoring: Maximum Position Lag Value parameter to set a value for the maximum
permissible lag distance that provides sufficient control freedom and eliminates the possibility of a
collision.
The default value is usually suitable.
5. Set a value for the parameter Monitoring: Maximum Position Lag Filter Time that provides sufficient
control freedom and excludes the possibility of a collision.
The default value is usually suitable.
ð With the next Activate configuration [} 130] you have activated the position lag monitoring for the
selected NC axis.
1. Activate the configuration via or via the Visual Studio Menu > TwinCAT > Activate Configuration.
2. If no licenses have been activated yet on the target system, the following dialog appears. For an initial
test you can create a trial license by selecting Yes and entering a security code.
Alternatively, a restart can be triggered via or via the Visual Studio Menu > TwinCAT > Restart
TwinCAT System.
ð The TwinCAT project is activated and the axes can be moved manually via the commissioning
dialog. More here [} 131].
ð If, on the other hand, you want to move an axis via the PLC, create a PLC in advance according to
Simple movement via the PLC [} 132] and activate the TwinCAT project again.
4. Log in the PLC via or via Visual Studio Menu > PLC > Login.
5. Then start the PLC via or via the Visual Studio Menu > PLC > Start.
DANGER
Risk of injury due to movement of axes!
The commissioning results in a movement of axes.
• Make sure that neither you nor others are harmed by the movement, e.g. by maintaining a suitable
safety distance.
• Do not perform any action whose consequences you cannot estimate
WARNING
Incorrect axis position during initial commissioning
Without referencing / calibrating the axis position, the displayed axis position may deviate from the actual
axis position.
• Perform a homing to determine the correct actual position using a reference signal.
Enable axis
Via Enabling > Set the corresponding dialog opens, with which the axis and the movement directions can be
enabled and the override can be set. Only when the axis and the direction of movement are enabled, it is
possible to move the axis in the corresponding direction of movement.
==>
The axis can be moved manually via the buttons or function keys F1-F4. The velocity set in the axis
parameters [} 74] is used for "Manual Velocity (Fast)" or "Manual Velocity (Slow)".
DANGER
Risk of injury due to movement of axes!
The commissioning results in a movement of axes.
• Make sure that neither you nor others are harmed by the movement, e.g. by maintaining a suitable
safety distance.
• Do not perform any action whose consequences you cannot estimate
WARNING
Incorrect axis position during initial commissioning
Without referencing / calibrating the axis position, the displayed axis position may deviate from the actual
axis position.
• Perform a homing to determine the correct actual position using a reference signal.
2. Select the name and location in the dialog Add New Item.
The Tc2_MC2 library contains the PLCopen specified Motion Control function blocks. These can be used to
manage NC axes and program movements.
1. Right click on References > Add library...
All necessary data types and function blocks for a simple PLC Motion program are contained in the library
Tc2_MC2.
AXIS_REF
For each axis one instance of the data type AXIS_REF is required, which is the interface between PLC and
NC. It contains all the information about the axis that is given to the MC function blocks as a reference.
MC_Power
The function block MC_Power is used to enable an axis and its directions of movement.
MC_Reset
MC_MoveAbsolute
MC_MoveAbsolute is a simple Motion function block that can be used to position an axis to an absolute
target position.
Simple programming
1. Open in the PLC project at POUs the MAIN(PRG).
2. Add the following declarations to MAIN(PRG).
PROGRAM MAIN
VAR
axis : AXIS_REF;
fbPower : MC_Power;
fbStop : MC_Stop;
fbReset : MC_Reset;
fbMoveAbsolute : MC_MoveAbsolute;
enableAxis : BOOL;
executeStop : BOOL;
executeReset : BOOL;
executeMove : BOOL;
override : LREAL := 100;
position : LREAL := ???; // ToDo: set to a reachable position
velocity : LREAL := ???; // ToDo: set velocity for move absolute
END_VAR
3. Insert the following program code into MAIN(PRG).
fbPower(
Axis := axis,
Enable := enableAxis,
Enable_Positive := enableAxis,
Enable_Negative := enableAxis,
Override := override,
BufferMode := ,
Options := ,
Status => ,
Busy => ,
Active => ,
Error => ,
ErrorID =>);
fbStop(
Axis := axis,
Execute := executeStop, // The command is executed with a positive edge.
Deceleration := , // If the value is ≤ 0, the deceleration
// parameterized with the last Move command is used.
Jerk := , // If the value is ≤ 0, the jerk parameterized
// with the last Move command is used.
Options := ,
Done => ,
Busy => ,
Active => ,
CommandAborted => ,
Error => ,
ErrorID => );
fbReset(
Axis := axis,
Execute := executeReset, // The command is executed with a positive edge.
Done => ,
Busy => ,
Error => ,
ErrorID => );
fbMoveAbsolute(
Axis := axis,
Execute := executeMove, // The command is executed with a positive edge.
Position := position,
Velocity := velocity,
Acceleration := , // If the value is 0, the standard acceleration from
// the axis configuration in the System Manager is used.
Deceleration := , // If the value is 0, the standard deceleration from
// the axis configuration in the System Manager is used.
Jerk := , // If the value is 0, the standard jerk from the axis
// configuration in the System Manager is applied.
BufferMode := MC_BufferMode.MC_Buffered,
Options := ,
Done => ,
Busy => ,
Active => ,
CommandAborted => ,
Error => ,
ErrorId => );
4. For the call from fbMoveAbsolute, adjust the target position and the dynamics according to your real
axis.
5. Build the PLC project.
ð The axis instance of the AXIS_REF should now be displayed among the PLC instances in the
Solution Explorer.
6. Link the PLC instance of AXIS_REF with the axis instance of the NC.
3. Right click on the NC axis (Axis 1) in the Solution Explorer and select Add to Scope.
ð If there is no Measurement Project in the Solution yet, the dialog Create new Project opens.
4. Select Empty Measurement Project as the project type and a name for your Measurement Project and
confirm with OK.
ð Positions and dynamics of the axis have been recorded and can be displayed by the Scope View.
For further details, such as adding more variables to the Data Pool, and creating new/different diagrams,
please refer to the TE13xx | TwinCAT 3 Scope View documentation.
9 Special NC functionalities
Modulo Factor
The modulo positioning basically refers to an adjustable Modulo Factor, which is set in the TwinCAT
Engineering. The axis and its use must be observed here, for example:
• If a PTP axis is used, the Modulo Factor of the axis encoder applies; details in the Notes on the modulo
positioning of a PTP axis.
• If, for example, a mover is used on an XTS system in a CA group, the Rail Length set in the CA group
applies.
• If an XPlanar mover is used, its "C-axis" modulo can be positioned. Here, the Modulo Factor is set as
"C coordinated modulus" in the Init parameters of the XPlanar mover.
The Modulo Tolerance Window defines a position window around the current modulo set position of the axis.
The window width corresponds to twice the specified value (set position ± tolerance value) and is specified in
the TwinCAT Engineering:
• In the case of a PTP axis or an axis in a CA group, the Tolerance Window is defined in the axis
encoder
• In the case of the C-axis of an XPlanar mover, the Tolerance Window is defined in the Init parameters
of the XPlanar mover.
The positioning of an axis is always referenced to its current actual position. Unintentional revolutions may
be performed if the actual position and the target position are very close to each other, for example, if the
actual position is minimally greater than the target position and Direction = mcDirectionPositive
was selected. This can occur in particular if the actual position is determined inaccurately (e.g. on account of
incorrect positioning due to the axis stalling, or due to the finite resolution of the encoder). In order to avoid
this, a tolerance window for modulo positioning can be set. If the distance between the start and target
positions is less than or equal to the Tolerance Window, then the target position is driven to by the shortest
route (as with Direction = mcDirectionShortestWay), i.e. also contrary to the direction specified.
Examples
• Modulo Factor = 100
• Tolerance Window = 1
Parameter Direction Absolute Target posi- Parameter Relative Absolute Modulo end
Startposi- tion Additional path end posi- position
tion Turns tion
mcDirectionPositive 110 10 0 0 110 10
mcDirectionPositive 110.9 10 0 -0.9 110 10
mcDirectionPositive 112 10 0 98 110 10
mcDirectionPositive 95 10 0 15 110 10
mcDirectionPositive 110 110 0 ERROR: INVALID TARGET POSITION
Parameter Direction Absolute Target posi- Parameter Relative Absolute Modulo end
Startposi- tion Additional path end posi- position
tion Turns tion
mcDirectionPositive 95 10 3 315 410 10
mcDirectionPositive 110 110 3 ERROR: INVALID TARGET POSITION
Further samples
Further examples without the Additional Turns parameter can be found in the Notes on the modulo
positioning of a PTP axis.
These characteristics and the fact that an axis can change its different operation modes at runtime (e.g.
interpolating path axis (NCI), master PTP axis, slave axis, external setpoint generation) further increase the
flexibility of a TwinCAT axis.
The superimposition of internal and external setpoint sources generally enables a wide range of new
applications and solutions.
Examples of use:
• External setpoint specification can be used for implementing an individual new setpoint profile, which is
not available in TwinCAT NC. This profile can be mathematically very simple or as complex as
necessary. Since the externally generated setpoint profile can also be superimposed on the standard
profile, corrective functions can thus also be supplemented.
In this way, a position-based setpoint profile can be implemented for systems that are difficult to control
or non-linear, for example a position-based deceleration ramp for hydraulic axes.
• One application for the superposition (mixing) of two internal setpoint sources is the combination of
interpolating path processing (NCI) and the 'flying saw' function (PTP slave). Multi-dimensional
machining, e.g. a circle, on a moving workpiece is thus possible, which previously was only possible
with stationary workpieces. This measure increases the efficiency of a machine.
• External setpoint generation can also be used in order to enable a certain lead time (in the multi-digit
second range) between the unit generating the setpoints (e.g. the execution of a DIN-NC program
feeding virtual axes) and the real axes. Collision monitoring and strategies for collision avoidance can
then be realized.
• A further important application are coordinate transformations (restricted to regular and unambiguous
transformations without singularities), e.g. geometries such as a 'two-bar linkage' or conversion
between rotary and translatory coordinates.
This new function is available with the PLC function blocks MC_ExtSetPointGenEnable and
MC_ExtSetPointGenDisable in the Tc2_MC2 library. Furthermore, there is an example for an external setpoint
generator (3-phase profile with acceleration rectangle), see section TwinCAT NC-PTP Examples.
The adoption of the external setpoint specifications is initiated by an ADS axis function from the PLC with the
function block MC_ExtSetPointGenEnable. The axis start types absolute (1) or relative (2) and, if sensible
and required, the target position of the axis, are specified as parameters. This target position has either an
absolute or relative effect, depending on the starting mode, and enables position and target position window
monitoring (PEH). Thus, enabling the external setpoint generation is similar to a conventional axis start.
A status bit of the axis reference Axis.Status.ExtSetPointGenEnabled informs about the status, namely
whether the external setpoint generation, is enabled or disabled.
To be observed:
• In case of an axis error (runtime error of the axis) or an axis reset (including edge change of the
software controller enable) the external setpoint specification is automatically disabled (similar to
an abortion of PTP axis positioning in case of a runtime error or axis reset).
• If only external setpoint generation is carried out, both absolute and relative start types are
permitted.
If external setpoint generation is started in parallel or in addition to internal setpoint generation
(PTP), only the relative starting mode is possible, since the internal positioning is ultimately
always converted to an absolute start, and it is not possible to have two absolute positions
simultaneously.
• Whilst external positioning can be activated during an active internal PTP positioning via the
relative start type, the opposite case is not permitted.
• If the external setpoint generation is already active and this is activated for the repeated time,
then the start types must match, otherwise this is answered with an error.
The repeated activation of the external setpoint generation can be useful insofar as here the
target position is taken over each time and thus the target position window monitoring (PEH) is
updated.
External setpoint specification is switched off from the PLC via the function block
MC_ExtSetPointGenDisable. A feedback is given by the already mentioned status bit of the axis reference
Axis.Status.ExtSetPointGenEnabled.
After disabling the external setpoint generation, the external target position is taken over for exactly
one more cycle.
After faultless activation of the external setpoint generation, in each PLC cycle a setpoint packet can now be
created at the axis interface. A setpoint package consists of the external set position, target velocity, set
acceleration and set direction (-1, 0, +1).
The set direction is of particular importance here, because setpoints are only accepted and applied internally
if this is not equal to zero (0: no movement). For the complete range of external setpoint generation, the
direction flag therefore has to be set overlapping at the start and at the end.
To be observed:
• After resetting of the set direction to zero, the external target position is taken over for exactly
one further SAF cycle.
• The set direction should already be set to a value not equal zero (i.e. -1 or +1) one cycle before
and for one more cycle after the motion. This provides a safe time frame that is guaranteed to
prevent a value being ignored, either at the start or at the end.
The PLC task that generates and specifies the setpoints must operate synchronously, i.e. with the same
cycle time as the NC SAF task (port 501). This PLC task also has to have the same high priority, perhaps an
even higher one, than the NC-SVB task (port 511).
Optimization options:
Dead time caused by transport via the cyclic axis interface can be compensated for an axis. This dead time
compensation can be set by means of the dialogs on the encoder and drive of the NC axis (ON (with
velocity)).
Positive backlash
Positive backlash occurs in systems where the measuring system is directly coupled to the drive. In this case
the backlash exists between the drive and the load. When the direction of motion is reversed, the measuring
system will detect a change in position before the load has moved. So the encoder, which here measures
the position of the load indirectly, leads the actual position of the load. As a consequence, the load will not
reach the set position, it will be shorten by the length of the backlash.
In the figure below, a movement from left to right is defined as a positive movement.
The encoder leads the load (e.g. machine table), so the measured encoder position, leads the actual position
of the table. Therefore the table’s movement will be too short.
In this case enter a positive correction value for the backlash (= normal case).
Negative backlash
Negative backlash occurs in systems where a mechanical tolerance exists between the drive and the
measuring system. When the direction of motion is reversed the load immediately moves in the new direction
and the measuring system won’t detect the changed position. In this case the load will travel further than
required. The encoder, which measures the position of the load directly, lags behind the actual position of
the machine part.
The encoder lags behind the actual position of the load (e.g. machine table). Therefore the table will travel
too far.
Neutral backlash
In systems, neutral backlash is an exception. In this case the measuring system is directly coupled to the
load and electrically connected with the drive. Here the encoder position and the load position are the same.
Now when the drive’s direction of motion is reversed, the backlash will be automatically compensated. The
position control loop is closed around the drivetrain because the encoder is coupled to the load directly. The
set position can be reached with no further compensation.
The encoder is directly coupled with the load (e.g. machine table) and ensuring steady state
accuracy. No special settings are required.
• A negative backlash is undesirable, because an axis with a backlash in the encoder system is difficult
to control (stationery vibrations / oscillations). Typically there are further steps necessary to solve this
problem.
• It is not necessary to differentiate between position interface (position control in the drive) and velocity
interface (position control in TwinCAT), because they have the same effect. This applies to all variants
of backlashes.
• In case of neutral backlash there is no compensation action necessary, even though there is a
mechanical backlash. The encoder system is coupled to the machine table therefore enforcing steady
state accuracy.
The following table shows a description of TwinCAT position correction for drives in cyclic position and
velocity interfaces.
The typical positioning of such an axis is first of all made at high speed up to a parameterization distance
away from the target position (creep distance in positive or negative direction). From this position you switch
to slow traverse, so that the physical velocity (actual velocity) is reduced to a slower constant velocity. The
slow traverse is then also switched off at a closer distance from the target (braking distance) and the brake is
then activated after a parameterized time (delay time for brake incidence).
This particular positioning sequence is for the sole purpose of ensuring that the axis reaches its target
position in the most accurate and repeatable way.
In case a positioning inaccuracy occurs depending on the last physical direction of travel (typical effect of a
backlash), then a looping distance is activated. This looping distance has the effect that the target position is
always approached from the same direction thus reducing the backlash influence. In case of an axis stop
basically the same sequence is run through as for positioning without looping distance. However the priority
for an axis stop lies on a shorter braking distance or time and not on the positioning accuracy. There is the
separate parameter (looping distance for stop) for stopping in the shortest possible distance.
General
There are two equal possibilities available for the physical control of the axis, in the form of discrete travel
signals.
An axis start will only be initiated if the distance from the target point is in fact larger than the
parameterized braking distance.
An override modification (also override = 0) only takes effect within the main travel phase.
If the override is set to 0 within one of the braking phases, the initiated braking phase is ended
without being influenced.
I/O configuration: Drive interface for rapid/creep axes NC → I/O (12 bytes)
Parameter Description
Creep distance positive The creep distance in the positive direction gives the distance to the target
direction position, below which the velocity changes from rapid to creep velocity, if the
direction of travel is positive.
If a looping distance is selected then this distance is based on the movement
reversal point.
This distance is denoted by Δp1 in positioning example 1 [} 153]
Creep distance negative The creep distance in the negative direction gives the distance to the target
direction position, below which the velocity changes from rapid to creep velocity, if the
direction of travel is negative.
If a looping distance is selected then this distance is based on the movement
reversal point.
Braking distance positive The braking distance in the positive direction gives the distance to the target
direction position, below which the creep velocity is switched off, if the direction of travel is
positive.
This distance is denoted by Δp2 in positioning example 1 [} 153]
Braking distance The braking distance in the negative direction gives the distance to the target
negative direction position, below which the creep velocity is switched off, if the direction of travel is
negative.
Brake incidence delay This delay time gives the start-up delay of the brakes after switching off of the
time in pos. direction creep velocity, if the direction of travel is positive.
In positioning example 1 [} 153], this time is between the times T4 and T5.
Brake incidence delay This delay time gives the start-up delay of the brakes after switching off of the
time in negative direction creep velocity, if the direction of travel is negative.
Rapid to creep velocity This waiting time is between the switching off of the rapid velocity and switching
delay time on of the creep velocity.
Parameter Description
In positioning example 1 [} 153] , this time is between the times T2 and T3.
Creep distance for stop The creep distance for stop gives the distance that is covered with the creep
velocity after calling up the stop. This creep distance is usually selected shorter
than the creep distances in positive and negative direction, since the axis should
stop as soon as possible and the exact positioning is not a priority.
This distance is denoted by Δp1 in positioning example 3 [} 155]
Brake release delay The brake is released immediately the axis is started and after elapse of the
brake release delay either the rapid or creep velocity is activated depending on
the displacement.
In positioning example 1 [} 153] , this time is between the times T0 and T1.
Pulse time in positive This parameter is not evaluated and therefore has no effect.
direction
Pulse time in negative This parameter is not evaluated and therefore has no effect.
direction
Parameter Description
OPERATION MODE: The looping distance can be activated with this flag. The looping distance is for
looping distance approaching the target position always from the same direction. In the case of a
positive (negative) looping distance a target position in the positive (negative)
direction is increased by the amount of the looping distance and the target then
approached from the opposite direction. Consequently the target position in case
of a positive looping distance is always approached with negative velocity and a
negative looping distance with positive velocity.
Looping distance (+ / -) The looping distance gives the distance, by which the target position is exceeded
if necessary so that it is possible to move to the target position from the required
direction.
This distance is denoted by creep distance (looping distance) in positioning
example 2 [} 154]
nAxisState Description
22 Braking phase: High-to-low speed delay time active
23 Braking phase: Low speed travel
24 Braking phase: Delay time for brake incidence active
Positioning examples:
Positioning examples
Fig. 2: TcNcTwoSpeed_Positioning1
Fig. 3: TcNcTwoSpeed_Positioning2
Download finder
Our download finder contains all the files that we offer you for downloading. You will find application reports,
technical documentation, technical drawings, configuration files and much more.
Please contact your Beckhoff branch office or representative for local support and service on Beckhoff
products!
The addresses of Beckhoff's branch offices and representatives round the world can be found on our internet
page: www.beckhoff.com
You will also find further documentation for Beckhoff components there.
Beckhoff Support
Support offers you comprehensive technical assistance, helping you not only with the application of
individual Beckhoff products, but also with other, wide-ranging services:
• support
• design, programming and commissioning of complex automation systems
• and extensive training program for Beckhoff system components
Hotline: +49 5246 963-157
e-mail: [email protected]
Beckhoff Service
The Beckhoff Service Center supports you in all matters of after-sales service:
• on-site service
• repair service
• spare parts service
• hotline service
Hotline: +49 5246 963-460
e-mail: [email protected]
Beckhoff Headquarters
Huelshorstweg 20
33415 Verl
Germany
Phone: +49 5246 963-0
e-mail: [email protected]
web: www.beckhoff.com
Electronic cam plates in TwinCAT 3 require careful handling as they describe a nonlinear relationship between a master and a slave axis in a coupled axis system. Valve characteristic curves are necessary for controlling hydraulic axes, indicating a non-linear relationship between the target velocity of an NC axis and the variable output to the controlled device. Such configurations are managed under Tables in TwinCAT 3, which facilitate motion diagrams (as detailed in TE1510 | TwinCAT 3 CAM Design Tool TF5050) and valve diagrams (TE1500 | TwinCAT 3 Valve Diagram Editor) to ensure precise motion control and system efficiency .
Performing homing with digital inputs in TwinCAT 3 involves using a Drive Status Byte with 8 digital inputs to provide a signal source for the homing sensor. The process image must have an appropriate mapping for these inputs to the desired position. The digital inputs are mapped manually in the process image and differ depending on the hardware used, such as MDP703/733 hardware, which employs the terminal's direct digital inputs E1 and E2. It's essential to ensure compatibility and correct placement of inputs to accurately home an axis and maintain precision in operations .
The Minimum and Maximum Drive Output Limitation parameters in TwinCAT 3 restrict the velocity output to ensure hardware protection. The Minimum Drive Output Limitation sets a lower bound, while the Maximum Drive Output Limitation sets an upper bound for the drive's output. Both parameters provide a directional-dependent limitation of the total output, allowing control over the velocity, torque, or current output to prevent operating beyond safe limits, thereby safeguarding the hardware . The values range from -1.0 to 1.0, where 1.0 represents an unrestricted output of 100% . By constraining output within these bounds, the parameters help in avoiding mechanical overloading and excessive wear and tear on system components ."}
TwinCAT 3 supports various encoder modes that impact how encoder position values are calculated: 1. **INCREMENTAL Mode**: Requires homing to initialize the actual position. This mode doesn't rely on the absolute characteristics of the feedback system and can be used with both incremental and absolute encoders . 2. **INCREMENTAL (singleturn absolute)**: Extends the incremental mode by considering retained data from the last stored position. If a single-turn absolute encoder is used, deviations up to half an encoder revolution can be accounted for . 3. **ABSOLUTE Mode**: Suitable for multi-turn absolute encoders. It prevents overflow of position feedback, which would result in runtime errors. This mode ensures the system's position is initialized without additional homing if installed correctly . 4. **ABSOLUTE MULTITURN RANGE (with single overflow)**: Allows for a single overflow during travel and requires correct end position parameterization . 5. **ABSOLUTE SINGLETURN RANGE (with single overflow)**: Permits travel paths with overflow within one revolution and is defined by the Encoder Sub Mask . 6. **ABSOLUTE (modulo)**: Used when travel exceeds the absolute range, such as in endlessly running systems like conveyor belts. It requires activation of retain data and correct Modulo Factor parameterization for accurate position initialization . These modes, influenced by parameters like the Modulo Factor and Encoder Sub Mask, determine how the encoder values are calculated and maintained during system operation .
The Reference Velocity and Maximum Velocity parameters play crucial roles in controlling axis speed limitations in TwinCAT 3. Reference Velocity at an Output Ratio of 1.0 establishes the upper physical limit for axis velocity, ensuring the controlled velocity does not exceed a predefined maximum at that ratio. It sets a ceiling on how fast the axis can physically move, corresponding to input signals for analog control or digital commands like SoE or CoE . Maximum Velocity, however, defines a logical speed limit that setpoint generation should not exceed . Both parameters must be consistent; exceeding the Reference Velocity at 1.0 with the Maximum Velocity can result in an error, preventing velocities beyond the set limits . These parameters ensure safety by preventing hardware exceeds its designed speed, thus protecting the system from potential damage .
In TwinCAT 3, the velocity scaling parameters affect digital drive controllers by determining how the NC output value is adjusted in velocity precontrol mode using the Output Scaling Factor (Velocity). This scaling is necessary for digital controllers like CANopen DS402 to ensure accurate velocity setpoints are sent to the drive . Torque scaling parameters can be adjusted similarly, allowing for optional output scaling of torque values, which may be necessary to match the servo control requirements or compensate for dynamic model transformations . These parameters might be adjusted to ensure proper synchronization between digital setpoints and physical motion, allowing for precise control over drive behavior and protecting hardware by setting output limits . Additionally, accurate scaling helps in maintaining system stability and avoiding errors during operation ."}
In TwinCAT 3, the process image serves as a cyclical interface that connects an axis with various drive components by establishing links between the process images of the axis and the drive hardware. When the hardware is directly supported by the system, these links are configured automatically. However, challenges arise when dealing with unknown hardware because these connections must then be manually established to integrate the drive components correctly . This manual setup involves configuring the interface between NC drivers and the connected hardware, which can be complex due to ongoing developments and changes in the interface structures .
TwinCAT 3 handles different axis types, each with distinct features and significance, in its Motion Control systems. One type is the **Continuous Axis**, where drive hardware processes continuous setpoint specifications for position or velocity, utilizing digital servo drive controllers or hardware following an analog value . Another is the **Encoder Axis**, used when integrating a pure encoder system as an axis object. Encoder axes lack their own setpoint generator, meaning the setpoint matches the actual value. This axis can serve as a master in coupling but not as a slave, leading to noise in the setpoint transferred to slave axes . Finally, the **Discrete Axis (Two-Speed)** supports motors with different pole pair numbers or frequency inverters, enabling rapid and creep positioning but does not feature prominently as compared to Continuous or Encoder axes . Each type plays a key role in setting up motion systems, with Continuous and Encoder axes being more versatile and commonly applied in various configurations ."}
Time Compensation in TwinCAT 3 is crucial for precise high-precision motion control, which involves converting positions into times and vice versa with dead time compensation of the axes. This ensures accurate synchronization and positioning by compensating for delays inherent in the system . It can be configured through the Time Compensation tab either in the drive settings for the output direction or the axis encoder settings for data acquisition. Configuration involves enabling dead time compensation and selecting the mode, such as 'OFF', 'ON (with velocity)', or 'ON (with velocity and acceleration)' . Additional settings include specifying whether IO time is absolute, encoder or drive delay in cycles, and extra fixed delays due to hardware .
Unanswerable Question