MC_ReadTrackPositions
The function block MC_ReadTrackPositions returns the current XTS track and XTS part target positions with the corresponding object IDs. The axis must be in a CA group for the function block to supply valid values. If no track is activated for the axis, the current absolute setpoints are returned with TrackId/PartId = 0.
Inputs
VAR_INPUT
Enable : BOOL;
END_VAR
Name | Type | Description |
---|---|---|
Enable | BOOL | The command is executed as long as Enable is active. |
Inputs/outputs
VAR_IN_OUT
Axis : AXIS_REF;
END_VAR
Name | Type | Description |
---|---|---|
Axis | AXIS_REF | Reference to an axis (see AXIS_REF). |
Outputs
VAR_OUTPUT
Valid : BOOL;
Busy : BOOL;
TrackPosition : LREAL;
TrackId : OTCID;
PartPosition : LREAL;
PartId : OTCID;
Error : BOOL;
ErrorId : UDINT;
END_VAR
Name | Type | Description |
---|---|---|
Valid | BOOL | This output indicates that other output values are valid for this function block. |
Busy | BOOL | This output becomes |
TrackPosition | LREAL | Position in the active track reference system. |
TrackId | OTCID | Object ID of the active track reference system. |
PartPosition | LREAL | Position on the current XTS part. |
PartId | OTCID | Object ID of the current XTS part. |
Error | BOOL | This output becomes |
ErrorId | UDINT | Contains the command-specific error code of the last executed command. Details of the error code can be found in the ADS error documentation or in the NC error documentation (error codes 0x4nnn and 0x8nnn). |
Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT V3.1.4024.7 TF5400 Advanced Motion Pack V3.1.10.1 | PC or CX (x64) | Tc3_McCollisionAvoidance, Tc3_McCoordinatedMotion, Tc2_MC2 |