MC_GearInPosCA

MC_GearInPosCA 1:

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

MC_GearInPosCA 2: 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 RatioNumerator and RatioDenumerator inputs or by entering a decimal value for the RatioNumerator and leaving the RatioDenumerator unchanged (the default value is 1). The gear ratio is entered as a factor, e.g. a value of 0.8 means that the slave velocity is 0.8 * master axis velocity (or 80 % of the master axis velocity). The value for the factor is not limited, it could be greater than 1.0 or negative.

RatioDenumerator

UINT

Denominator for the gear ratio.

MasterSyncPosition

MC_LREAL

This input is of type LREAL. Position of the master at which the slave is InSync and has the correct gear ratio.

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 mcSyncStrategyLate.

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:

MC_DEFAULT = invalid, as there is no default velocity

MC_MAXIMUM = corresponds to the value of the axis parameter 'Maximum Velocity' of the slave axis

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 MC_DEFAULT.

 

Special input values:

MC_DEFAULT = corresponds to the value of the axis parameter 'Default Acceleration' of the slave axis

MC_MAXIMUM = corresponds to the value of the axis parameter 'Maximum Acceleration' of the slave axis

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 MC_DEFAULT.

 

Special input values:

MC_DEFAULT = corresponds to the value of the axis parameter 'Default Deceleration' of the slave axis

MC_MAXIMUM = corresponds to the value of the axis parameter 'Maximum Deceleration' of the slave axis

Jerk

MC_LREAL

Maximum jerk of the axis during the synchronization phase. The jerk must be ≥100. The input is preset with MC_DEFAULT.

 

Special input values:

MC_DEFAULT = corresponds to the value of the axis parameter 'Default Jerk' of the slave axis

MC_MAXIMUM = invalid

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.

Notice When using geo-compensation, special attention must be paid to the gap. The mover gap for Collision Avoidance always relates positionally and dynamically to the offset path geometry. 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. Ensure the gap is large enough.

BufferMode

MC_BUFFER_MODE

In this version only mcAborting and mcBuffered are available (see MC_BUFFER_MODE).

Options

ST_GearInPosCAOptions

The Options can be used to influence the synchronization profile of the slave, in addition to the SyncStrategy (from V3.1.2.47) (see ST_GearInPosCAOptions).

MC_GearInPosCA 3:

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.

MC_GearInPosCA 4: 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).

MC_GearInPosCA 5: 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 TRUE when the slave is synchronized. If the dynamics of the slave axis is too low to follow the movement of the master axis, the output InSync could be reset to FALSE, after which the slave axis starts synchronizing again.

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 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
to include

TwinCAT V3.1.4018.26

TF5400 Advanced Motion Pack V3.1.1.17

PC or CX (x64)

Tc3_McCollisionAvoidance, Tc3_McCoordinatedMotion, Tc2_MC2