MC_SetCoordinateTransform

MC_SetCoordinateTransform 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_SetCoordinateTransform 2:

MC_SetCoordinateTransform 3:

MC_SetCoordinateTransform 4:

Enables the coordinate transformation for subsequent movements. Success is indicated by Active OR Done.

Decouples subsequent movements from a conveyor (see MC_TrackConveyorBelt).

Subsequent movements (e.g.: MC_MovePath) are made relative to the coordinate transformation.

MC_SetCoordinateTransform 5:

Use case for changing the reference system

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

MC_SetCoordinateTransform 6: VAR_INPUT

VAR_INPUT
    Execute        : BOOL;
    CoordTransform : MC_COORD_REF;
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).

MC_SetCoordinateTransform 7: MC_SetCoordinateTransform 8: VAR_IN_OUT

VAR_IN_OUT
    AxesGroup      : AXES_GROUP_REF;
END_VAR

Name

Type

Description

AxesGroup

AXES_GROUP_REF

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

MC_SetCoordinateTransform 9: VAR_OUTPUT

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

Active indicates the command is being executed.

Active indicates the new Coordinate Transformation is set successfully. (MC Coordinated Motion Group only)

Active indicates a Deceleration from Conveyor Tracking. (MC Coordinated Motion Group only)

Active becomes FALSE when one of the outputs Done, CommandAborted or Error is set.

Note: As per PLCOpen when Done, Active is reset. In the case of negligible or no deceleration, Active can be TRUE for only a negligible period of time. When detecting Active from a PLC program it is therefore prudent to check (Active OR Done).

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 System Type

PLC Libraries to be Linked

TwinCAT V3.1.4022.25
TF5400 Advanced Motion Pack V3.1.6.03

PC or CX (x86 or x64)

Tc3_McCoordinatedMotion, Tc2_MC2