MC_GearInPosCA
This function block 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.
VAR_INPUT
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 (>0) is limited by the maximum velocity of the slave axis. If no value (0) is entered, an error occurs because there is no standard velocity. |
Acceleration | MC_LREAL | Maximum acceleration of the slave axis during the synchronization phase. The acceleration (≥1) is limited by the maximum acceleration of the slave axis. If no value (0) is entered, the standard acceleration of the slave axis is used. |
Deceleration | MC_LREAL | Maximum deceleration of the slave axis during the synchronization phase. The deceleration (≥1) is limited by the maximum deceleration of the slave axis. If no value (0) is entered, the standard deceleration of the slave axis is used. |
Jerk | MC_LREAL | Maximum jerk of the axis during the synchronization phase. If no value (0) is entered, the standard jerk of the slave axis is used. The minimum jerk must be ≥100, the maximum jerk is not limited. |
Gap | MC_LREAL | This value determines the minimum distance 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. |
VAR_IN_OUT
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). |
VAR_OUTPUT
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 system type | PLC libraries to be linked |
---|---|---|
TwinCAT V3.1.4018.26 TF5400 Advanced Motion Pack V3.1.1.17 | PC or CX (x86 or x64) | Tc3_McCollisionAvoidance, Tc3_McCoordinatedMotion, Tc2_MC2 |