AXCPL (axis coupling)

AXCPL (axis coupling) 1:

This block is required in order to couple any servo-axis as a slave to any other servo axis. The coupling can take place while the axes are stationary, or while the master axis is moving, depending on the type of coupling. Once a slave axis has been coupled it must no longer be addressed by movement commands, since it has lost its independence until such time as it is again uncoupled. The simplest type of coupling is linear coupling with a fixed gear ratio (an electronic gear). This kind of coupling can also have a negative gear ratio. The COPLOFF input has higher priority as the COPLON input. If a rising edge is presented to both the 'COPLOFF' and 'COPLON' inputs at the same time, the deactivate coupling command will be sent to the axis.

 

Note
Migrating to TwinCAT 2.11

If the Set Point Generator Type is set to '7 Phases (optimized)', the slave axis will reduce its acceleration to zero after it is being decoupled and it will then continue moving endless at constant velocity.
The decoupled axis will not be positioned to any target position. The behavior is comparable to a move commanded by MC_MoveVelocity.
With TwinCAT 2.10 the set point generator type is selectable.
From TwinCAT 2.11 the setting is fixed to '7 Phases (optimized)'.
If a project is upgraded from TwinCAT 2.10 to TwinCAT 2.11, the behavior will be as described here. After updating an existing application to TwinCAT 2.11, it might be necessary to adapt the PLC program.

The block has the following inputs:

Input

Data type

Description

AXID

INT

Axis ID

MASTERID

INT

ID of the master card

CPLMODE

INT

Coupling type

CPLPAR1

LREAL

Coupling parameter 1

CPLPAR2

LREAL

Coupling parameter 2

CPLPAR3

LREAL

Coupling parameter 3

CPLPAR4

LREAL

Coupling parameter 4

CPLON

BOOL

Activate coupling

CPLOFF

BOOL

Deactivate coupling

TMOUT

TIME

ADS Timeout-Delay

 

Output

Data type

Description

BUSY

BOOL

This output remains TRUE until the block has executed a command, but at the longest for the duration supplied to the ‘Timeout’ input. While Busy = TRUE, no new command will be accepted at the inputs. Please note that it is not the execution of the service but its acceptance whose time is monitored.

ERR

BOOL

This output is switched to TRUE if an error occurs during the execution of a command. The command-specific error code is contained in ‘ErrorId’. If the block has a timeout error, ‘Error’ is TRUE and ‘ErrorId’ is 1861 (hexadecimal 0x745). Is reset to FALSE by the execution of a command at the inputs.

ERRID

UDINT

Contains the command-specific error code of the most recently executed command. Is reset to 0 by the execution of an instruction at the inputs. The error numbers in ErrId can be consulted in the ADS error documentation

 

CPLMODE

Define

Coupling type

1

"Linear coupling"
Linear coupling with a fixed gear ratio. The ratio can be positive or negative, but the value must not be zero. It is also possible for the gear ratio of an existing coupling to be changed online. However, since this change will take effect abruptly, the gear ratio must only be altered by very small amounts in the fractional part of its value (mistuning).

‘CplPara1’:

gearing factor

‘CplPara2’:

reserved

‘CplPara3’:

reserved

‘CplPara4’:

reserved

2

”Diagonal coupling: Linear"
Weak diagonal synchronised coupling (”flying saw") with linear velocity curve.

Weak: master travel during the slave acceleration phase = 2*slave travel during the slave acceleration phase.

‘CplPara1’:

Abs. synchronous position of the master [mm]

‘CplPara2’:

Abs. synchronous position of the slave [mm]

‘CplPara3’:

Angle of inclination of the diagonal saw with reference to the orthogonal line to the master route [degrees]. The angle must be within the range greater than 0 degrees and smaller than or equal to 90 degrees.

‘CplPara4’:

Gearing factor (a value of 1.0 will be used if 0 is specified)

3

”Diagonal coupling: jerk-restricted"
Weak diagonal synchronised coupling (”flying saw") with jerk-restricted velocity curve.
Weak: master travel during the slave acceleration phase = 2*slave travel during the slave acceleration phase.

CplPara1’:

Abs. synchronous position of the master [mm]

CplPara2’:

Abs. synchronous position of the slave [mm]

CplPara3’:

Angle of inclination of the diagonal saw with reference to the orthogonal line to the master route [degrees]. The angle must be within the range greater than 0 degrees and smaller than or equal to 90 degrees.

CplPara4’:

Gearing factor (a value of 1.0 will be used if 0 is specified)

12

"Flying saw modulo coupling (acceleration-limited)"
This coupling type was specially developed for modulo axes (periodic continuous motion, where the period may or may not be 360.0 degrees). The special feature of this slave type is that, for the first time, the slave axis has a variety of sub-operating modes. Operating modes can be changed at any time via external requests. The slave axis responds with an intermediate phase, which means synchronization to the requested operating mode. This synchronization is implemented as a linear path control, i.e. across a broad range it is unaffected by the alterations in the master dynamics. For this modulo coupling, synchronization means that, a fixed orientation is produced over the shortest path length (± 1/2 period), based on the modulo period.

‘CplPara1’:

Gearing factor  (mandatory at the moment with 1.0 presupposed!)

CplPara2':

Maximum slave acceleration in percent based on minimum the slave acceleration of acceleration and deceleration. Value range: >0.0 to ... 1.0

CplPara3':

Master axis ID 2 for master coupling

CplPara4':

Optional table-ID (table types: equidistant cyclic and not equidistant cyclic)

This function is not approved yet !

15

"Linear coupling with cyclically variable gearing factor"
For a cyclic slave axis, the gearing factor is specified by the PLC via the axis interface (see variable "fAxisModeLReal" in the structure PLCTONC_AXLESTRUCT) and can be changed during each PLC cycle. This change is then automatically transferred from the PLC to the NC via the cyclic data exchange of the axis interface. To avoid extreme step changes of the gearing factor and thus step changes in acceleration, the acceleration of the slave resulting from a change in gearing factor can be limited via a limit parameter pa. The limit parameter is specified during axis coupling via the first coupling parameter.

CplPara1':

corresponds indirectly, i.e. relative to a maximum master velocity, to a maximum permitted acceleration (pa = aSlaveMax / v MasterMax ). The limit parameter pa corresponds to the reciprocal value of the run-up time tH = 1 / pa .

CplPara2':

reserved

CplPara3':

reserved

CplPara4':

reserved

16

"Bi-linear coupling"
Bi-linear coupling is comparable to linear coupling (coupling mode: 1), although two linear couplings are active simultaneously via gearing factor 1 and gearing factor 2 (for additional master axis ID 2). This mode may be used, for example, for tapping/thread cutting, where linear feed must be coordinated with rotary motion.
Remark:

If the main master axis 1 is not logically in motion, no slave target values are calculated, independent of the motion phase of master axis 2. In this context it should also be noted that an axis travelling with velocity override 0% is logically in motion!

‘CplPara1’:

Gearing factor 1 (gearing factor)

CplPara2':

Gearing factor 2 (incidental gearing factor)

CplPara3':

Master axis ID 2 for the gearing factor 2

CplPara4':

reserved

18

"Coupling with constant surface velocity and cyclically variable gearing factor"
This type contains the mathematical calculation for coupling between a rotary slave axis and a translatory master axis. Its purpose is to generate and re-adjust a constant surface velocity (peripheral speed), relative to the master axis, for the rotary calibrated and controlled slave axis, depending on its drum diameter. Via a second encoder (auxiliary encoder) that has to be configured for the slave axis in the system manager, the drum radius of this slave axis is automatically evaluated during each NC-SAF cycle (SAF = "Satzausführungstask", block execution task) and used for the calculation. This radius must never have the value 0.0 mm, since otherwise a calculation is no longer possible.
Additionally, a gearing factor g(t) (see variable "fAxisModeLReal" in the structure PLCTONC_AXLESTRUCT) is specified via the cyclic axis interface (see "linear coupling with cyclical variable gearing factor"), which in the most trivial case may have the constant value of 1.0 (no further influencing). Therefore, if the slave axis is calibrated to degrees via its main encoder and to mm via its auxiliary encoder (radius detection r(t)), and the master as translatory axis in mm, the slave velocity can be calculated according to the following formula:
vSlave = 360° / (2PI * r(t))* g(t)* vMaster .

‘CplPara1’:

corresponds indirectly, i.e. relative to a maximum master velocity, to a maximum permitted acceleration (pa = aSlaveMax / v MasterMax ). The limit parameter pa corresponds to the reciprocal value of the run-up time tH = 1 / pa .

‘CplPara2’:

reserved

'CplPara3':

reserved

'CplPara4':

reserved

 

Requirements

Development environment

Target system type

PLC libraries to include

TwinCAT v2.7.0

PC (i386)

PlcNc.Lib

TwinCAT v2.8.0

PC (i386)

TcNC.Lib