MC_MoveRelativeCA
The function block MC_MoveRelativeCA instructs a single axis to move over the relative distance defined in the function block, based on Collision Avoidance. Collision Avoidance has higher priority than the motion command. The axis may slow down or wait while the motion command is executed to avoid a collision. The function block does not output the signal Done
until the axis has traveled the specified distance.
Inputs
VAR_INPUT
Execute : BOOL;
ContinuousUpdate : BOOL;
Distance : MC_LREAL := MC_INVALID;
Velocity : MC_LREAL := MC_INVALID;
Acceleration : MC_LREAL := MC_DEFAULT;
Deceleration : MC_LREAL := MC_DEFAULT;
Jerk : MC_LREAL := MC_DEFAULT;
Gap : MC_LREAL := MC_DEFAULT;
BufferMode : MC_BUFFER_MODE := mcAborting;
Options : ST_MoveRelativeCAOptions;
END_VAR
Name | Type | Description |
---|---|---|
Execute | BOOL | The command is triggered by a rising edge at this input. |
ContinuousUpdate | BOOL | In this version, continuous updating is only available for the |
Distance | MC_LREAL | Specified relative distance for the command. |
Velocity | MC_LREAL | The velocity value must be greater than 0. It is automatically limited by the axis parameter 'Maximum Velocity'. A velocity must always be specified.
Special input values:
|
Acceleration | MC_LREAL | The acceleration value must be greater than or equal to 1 and is limited by the axis parameter 'Maximum Acceleration'. The input is preset with
Special input values:
|
Deceleration | MC_LREAL | The deceleration value must be greater than or equal to 1 and is limited by the axis parameter 'Maximum Deceleration'. The input is preset with
Special input values:
|
Jerk | MC_LREAL | The jerk must be ≥100. The input is preset with
Special input values:
|
Gap | MC_LREAL | This value determines the minimum gap to the predecessor for Collision Avoidance. If no value is entered, the default value of the group is used. |
BufferMode | MC_BUFFER_MODE | In this version only |
Options | ST_MoveRelativeCAOptions | For more information about the available options (from V3.1.2.47) see the documentation for ST_MoveRelativeCAOptions. |
The axis does not reach the target velocity, acceleration or deceleration The values for velocity, acceleration or deceleration may be automatically limited to the maximum axis velocity, acceleration and deceleration. Check the parameters Maximum Dynamics and Default Dynamics of the axis. It is also possible that the values of Maximum Dynamics are smaller than the Default Dynamics. |
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
Done : BOOL;
Busy : BOOL;
Active : BOOL;
CommandAborted : BOOL;
Error : BOOL;
ErrorId : UDINT;
END_VAR
Name | Type | Description |
---|---|---|
Done | BOOL | This output becomes |
Busy | BOOL | This output becomes |
Active | BOOL | If |
CommandAborted | BOOL | This output becomes |
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 |
---|---|---|
TwinCAT V3.1.4018.26 TF5400 Advanced Motion Pack V3.1.1.17 | PC or CX (x64) | Tc3_McCollisionAvoidance, Tc3_McCoordinatedMotion, Tc2_MC2 |