MC_HaltCA
The function block MC_HaltCA commands a single axis to stop with Collision Avoidance.
Inputs
VAR_INPUT
Execute : BOOL;
Deceleration : MC_LREAL := MC_DEFAULT;
Jerk : MC_LREAL := MC_DEFAULT;
Gap : MC_LREAL := MC_DEFAULT;
Options : ST_HaltCAOptions;
END_VAR
Name | Type | Description |
---|---|---|
Execute | BOOL | The command is triggered by a rising edge at this input. |
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. When using geo-compensation, special attention must be paid to the gap. Since the gap refers to the offset path when using geo-compensation, adjacent movers in the curves can collide if it is set too low. |
Options | ST_HaltCAOptions | For more information about the available options (from V3.1.2.47) see the documentation for ST_HaltCAOptions. |
The axis does not stop fast enough The given deceleration could be automatically limited to the maximum axis deceleration. Check the parameters Maximum Dynamics and Default Dynamics of the axis. It is also possible that the values of Maximum Dynamics are below 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 TRUE when the command was successfully executed. |
Busy | BOOL | This output becomes TRUE when the command is started with Execute and remains so as long as the function block executes the command. If Busy becomes FALSE again, the function block is ready for a new command. At the same time one of the outputs, Done, CommandAborted or Error is set. |
Active | BOOL | If Active is TRUE, the function block controls the axis. |
CommandAborted | BOOL | This output becomes TRUE if the command was interrupted by another command. |
Error | BOOL | This output becomes TRUE if an error has occurred during command execution. |
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 |