MC_GearInPosCA
The function block MC_GearInPosCA couples a slave axis to a master axis. The set values always form the source for the master values. Collision Avoidance has higher priority than axis coupling. The slave axis can be decoupled by sending a motion command using the buffer mode BufferMode mcAborting
.
Optimizations regarding MC_GearInPosCA as of TF5400 v3.2.27
- Optimizations to MC_GearInPosCA that prevent SAF cycle offset between master and slave axis.
- Optimizations to the gap controller when the axis is already in the target position and only the gap changes. If the adjacent mover is commanded, the new gap takes effect.
Inputs
VAR_INPUT
Execute : BOOL;
ContinuousUpdate : BOOL;
RatioNumerator : MC_LREAL := 1;
RatioDenumerator : UINT := 1;
MasterSyncPosition : MC_LREAL := MC_INVALID;
SlaveSyncPosition : MC_LREAL := MC_INVALID;
SyncStrategy : MC_SYNC_STRATEGY := mcSyncStrategyLate;
SyncMode : MC_SYNC_MODE;
MasterStartDistance : MC_LREAL := MC_IGNORE;
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_GearInPosCAOptions;
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 Gap. |
RatioNumerator | MC_LREAL | A gear ratio can be set by entering integer values at the |
RatioDenumerator | UINT | Denominator for the gear ratio. |
MasterSyncPosition | MC_LREAL | This input is of type |
SlaveSyncPosition | MC_LREAL | This input is of type LREAL. Position of the slave at which it is InSync with the correct gear ratio. |
SyncStrategy | MC_SYNC_STRATEGY | Defines the strategy that the slave uses for synchronization (see MC_SYNC_STRATEGY). The default strategy is |
SyncMode (available from V3.1.10.1) | MC_SYNC_MODE | Defines the direction in which the SlaveSync position is to be interpreted, see MC_SYNC_MODE. |
MasterStartDistance | MC_LREAL | If a positive value is set, the slave axis will not start synchronization until the master position is greater than or equal to the master position (MasterSyncPosition – MasterStartDistance). If a negative value is set, the synchronization will not start until the master position is less than or equal to (MasterSyncPosition – MasterStartDistance). If MasterStartDistance is not set, the slave starts synchronization as soon as the function block gives the Active signal. The exact behavior of the slave axis during the synchronization phase depends on the SyncStrategy. |
Velocity | MC_LREAL | Maximum velocity of the slave axis during the synchronization phase. The velocity value must be greater than 0. It is automatically limited by the axis parameter 'Maximum Velocity' of the slave axis. A velocity must always be specified.
Special input values:
|
Acceleration | MC_LREAL | Maximum acceleration of the slave axis during the synchronization phase. The acceleration value must be greater than or equal to 1 and is limited by the axis parameter 'Maximum Acceleration' of the slave axis. The input is preset with
Special input values:
|
Deceleration | MC_LREAL | Maximum deceleration of the slave axis during the synchronization phase. The deceleration value must be greater than or equal to 1 and is limited by the axis parameter 'Maximum deceleration' of the slave axis. The input is preset with
Special input values:
|
Jerk | MC_LREAL | Maximum jerk of the axis during the synchronization phase. 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_GearInPosCAOptions | The |
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
Master : AXIS_REF;
Slave : AXIS_REF;
END_VAR
Name | Type | Description |
---|---|---|
Master | AXIS_REF | Reference to an axis (see AXIS_REF). |
Slave | AXIS_REF | Reference to an axis (see AXIS_REF). |
Outputs
VAR_OUTPUT
StartSync : BOOL;
InSync : BOOL;
Busy : BOOL;
Active : BOOL;
CommandAborted: BOOL;
Error : BOOL;
ErrorId : UDINT;
END_VAR
Name | Type | Description |
---|---|---|
StartSync | BOOL | This output is set when the slave actively starts synchronization and reset when the slave is InSync. |
InSync | 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 |