MC_TrackConveyorBelt

MC_TrackConveyorBelt 1:

TF5410
TwinCAT 3 Motion Collision Avoidance

TF5420
TwinCAT 3 Motion Pick-and-Place

 

MC Group with Pick-and-Place

MC Group Coordinated Motion

MC_TrackConveyorBelt 2:

MC_TrackConveyorBelt 3:
(MC_TrackConveyorBelt 4:up to and including v3.2)

MC_TrackConveyorBelt 5:

The function block Mc_TrackConveyorBelt enables a reference system that is in motion. It synchronizes the AxesGroup with the ConveyorBelt in terms of velocity.

Synchronization with a position requires a motion command.

The function block thus helps to synchronize with an object that moves in a straight line through space. Example: products moving on a conveyor belt or other transport system.

The origin of the conveyor belt is parameterized with a coordinate system (CoordTransform). X is the conveying direction. The detected object position (InitialObjectPos) and the corresponding touch probe position (MasterRefPos) are entered in the function block.

Synchronization dynamics can be entered in the function block.

Movements executed after Active = TRUE are synchronized with the conveyor belt.

Execution of MC_TrackConveyorBelt with another instance causes direct synchronization with a second conveyor belt.

When changing the reference system, a conveyor belt can be decoupled.

MC_TrackConveyorBelt 6:

Use case for changing the reference system

The MC group can be decoupled by using MC_TrackConveyorBelt and changing the reference system. The reference system can be changed with MC_SetCoordinateTransform.

News and optimizations regarding MC_TrackConveryorBelt with TF5400 V3.2.27 for MC Group Coordinated Motion

MC_TrackConveyorBelt 7: Inputs

VAR_INPUT
    Execute               : BOOL;
    CoordTransform        : MC_COORD_REF;
    InitialObjectPos      : POINTER TO MC_LREAL;
    InitialObjectPosCount : UDINT;
    MasterRefPos          : MC_LREAL;
    Velocity              : MC_LREAL := MC_DEFAULT;
    Acceleration          : MC_LREAL := MC_DEFAULT;
    Deceleration          : MC_LREAL := MC_DEFAULT;
    Jerk                  : MC_LREAL := MC_DEFAULT;
END_VAR

Name

Type

Description

Execute

BOOL

The command is triggered by a rising edge at this input.

CoordTransform

MC_COORD_REF

Reference to a coordinate system (see MC_COORD_REF).

InitialObjectPos

POINTER TO MC_LREAL

Pointer to array [1..InitialObjectPosCount].

InitialObjectPosCount

UDINT

Dimension of the InitialObjectPos vector.

MasterRefPos

MC_LREAL

Touch probe position.

Velocity

MC_LREAL

Velocity for synchronization. The velocity must exceed the conveyor belt velocity. The velocity is not limited by the maximum axis velocity.

Acceleration

MC_LREAL

Used in the Conveyor Tracking object. The acceleration for synchronization. The acceleration is not limited by the maximum axis acceleration. If no value is entered, then the default acceleration of the Conveyor Tracking object is used.

Deceleration

MC_LREAL

Used in the Conveyor Tracking object. The deceleration for synchronization. The deceleration is not limited by the maximum axis deceleration. If no value is entered, then the default deceleration of the Conveyor Tracking object is used.

Jerk

MC_LREAL

The jerk for synchronization. If no value is entered, then the default jerk of the Conveyor Tracking object is used. The maximum jerk is not limited.

MC_TrackConveyorBelt 8: Inputs/outputs

VAR_IN_OUT
    AxesGroup             : AXES_GROUP_REF;
    ConveyorBelt          : AXIS_REF;
END_VAR

Name

Type

Description

AxesGroup

AXES_GROUP_REF

Reference to a group of axes (see Cyclic Group Interface).

ConveyorBelt

AXIS_REF

Reference to an axis. Reference to the conveyor axis.

MC_TrackConveyorBelt 9: Outputs

VAR_OUTPUT
    InSync                : BOOL;
    Busy                  : BOOL;
    Active                : BOOL;
    CommandAborted        : BOOL;
    Error                 : BOOL;
    ErrorId               : UDINT;
END_VAR

Name

Type

Description

InSync

BOOL

The output InSync becomes TRUE for the first time when the slave is synchronized with the velocity. If the slave dynamics is too low to follow the master movement, the output InSync could be reset to FALSE, after which the slave axis starts synchronizing again.

Notice Velocity synchronization: Active and InSync - the function block MC_TrackConveyorBelt synchronizes the AxesGroup with the velocity of the ConveyorBelt axis. The function block uses the given parameters for Acceleration, Deceleration and Jerk. When this synchronization movement begins, Active is set to TRUE. When the velocity of the ConveyorBelt is reached, InSync is set to TRUE. The synchronization status is continuously monitored and indicated with InSync.

Notice Conveyor movement, default tracking behavior and InSync - once the output signal InSync has been set, there are two options to maintain synchronization. mcTrackingBehaviorDynLimited - this behavior is the default (MC_Default) tracking behavior. The AxesGroup maintains velocity synchronization with the ConveyorBelt using the given parameters for Acceleration, Deceleration and Jerk. – mcTrackingBehaviorStayInSync - the AxesGroup maintains the velocity synchronization with the ConveyorBelt with unlimited parameters for Acceleration, Deceleration and Jerk.

Notice Position synchronization: MasterRefPos and InitialObjectPos - the function blocks MC_TrackConveyorBelt and MC_MovePath should be used together for flexible synchronization with a moving target position. After MC_TrackConveyorBelt.Active is set to TRUE, InitialObjectPos and the distance to MasterRefPos are appended to the next call to MC_MovePath. MC_TrackConveyorBelt.InSync = TRUE and MC_MovePath.Done = TRUE indicate that the synchronized position has been reached.

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

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.4022.25
TF5400 Advanced Motion Pack V3.1.6.03

PC or CX (x64)

Tc3_McCoordinatedMotion, Tc2_MC2