AXCPL (axis coupling)
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.
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" | |
‘CplPara1’: | gearing factor | |
‘CplPara2’: | reserved | |
‘CplPara3’: | reserved | |
‘CplPara4’: | reserved | |
2 | ”Diagonal coupling: Linear" 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" | |
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)" | |
‘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" | |
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" 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" | |
‘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 |