AXCPLTAB (table-based axis coupling)
This block is required in order to couple any servo-axis as a slave to any other servo axis. In this case the coupling is implemented in the form of a table, and this in turn consists of a specifiable number of support points (location curve).
Four different types of table are distinguished:
- equidistant linear tables,
- equidistant cyclical tables,
- monotonic linear tables and
- monotonic cyclical tables.
This kind of coupling can only be initiated while the axes are stationary. 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 COPLOFF input has highier 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.
The block has the following inputs:
Input | Data type | Description |
---|---|---|
AXID | UINT | Axis ID |
MASTERID | UINT | Id of the master axis |
SLAVEOFFSET | LREAL | A positional offset, 0.0 in the standard case, can be given for the interpretation of the slave position in the coupling table. The physical unit corresponds to the basic length unit associated with the axis (e.g. mm). |
MASTEROFFSET | LREAL | A positional offset, 0.0 in the standard case, can be given for the interpretation of the master position in the coupling table. The physical unit corresponds to the basic length unit associated with the axis (e.g. mm). |
SLAVEABSOLUT | UDINT | Interpretation of the slave table positions as absolute or relative positions |
MASTERABSOLUT | UDINT | Interpretation of the master table positions as absolute or relative positions |
TABID | UDINT | The table ID which is valid across the whole system is given here. Coupling a table assumes that the table already exists, that it has the appropriate dimensions, and that it has been filled with valid values. A distinction is drawn here between four different types of table:
|
CPLON | BOOL | Coupling on |
CPLOFF | BOOL | Coupling off |
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 |
Example
The diagram shows "AXCPLTAB_1", an instance of the AXCPLTAB block, by means of which the axis with ID 3 can be coupled to or uncoupled from the axis with ID 1 (the master axis) (at a rising edge of the variables "bCouple" or "bDiscouple"). The set position values of the master and of the slave are taken from a binary table which is present. An equidistant linear table is used in this example (TabId=1). In this example the positional offsets of the master and slave are pre-defined as 0.0. An example follows of an equidistant linear table in ASCII format, with 81 lines (master position from 0.0 to 80.0 mm or degrees; slave position from 0.0 to 279.72 mm or degrees).
81 | 2 |
+0.00000 | +0.00000 |
+1.00000 | +0.10783 |
+2.00000 | +0.43114 |
... | ... |
+76.00000 | +277.99809 |
+77.00000 | +278.75055 |
+78.00000 | +279.28886 |
+79.00000 | +279.61217 |
+80.00000 | +279.72000 |
Table type:
Equidistant linear table with 81 pairs of values (support points)
First line:
Number of lines (n=81) and number of columns (m=2)
Following lines:
n lines with the master position (absolute or relative) and the associated slave position (absolute or relative)
Remark:
Between the support points, a linear interpolation takes place in each SAF cycle of the axis. The table size and the way in which the discrete values are assigned to the position can be freely selected.
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 |