MC_MoveLinearAbsolutePreparation

MC_MoveLinearAbsolutePreparation 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_MoveLinearAbsolutePreparation 2:

MC_MoveLinearAbsolutePreparation 3:

MC_MoveLinearAbsolutePreparation 4:

The function block adds an absolute linear movement to the table of segments in the PathData structure. After creating a table, it can be executed via MC_MovePath. The function block MC_MoveLinearAbsolutePreparation can be called several times per cycle. A maximum of 30 entries are allowed per PathData table.

MC_MoveLinearAbsolutePreparation 5: VAR_INPUT

VAR_INPUT
    Position                 : POINTER TO LREAL;
    PositionCount            : UDINT;
    Velocity                 : MC_LREAL := MC_INVALID;
    Acceleration             : MC_LREAL := MC_DEFAULT;
    Deceleration             : MC_LREAL := MC_DEFAULT;
    Jerk                     : MC_LREAL := MC_DEFAULT;
    BufferMode               : MC_BUFFER_MODE := mcAborting;
    TransitionMode           : MC_TRANSITION_MODE := mcTransModeNone;
    TransitionParameter      : POINTER TO LREAL;
    TransitionParameterCount : UDINT;
    InvokeId                 : UDINT;
    DynamicConstraints       : REFERENCE TO IPlcDynamicConstraint := 0;
END_VAR

Name

Type

Description

Position

POINTER TO LREAL

Pointer to an array [1..PositionCount] of the target position vector.

PositionCount

UDINT

Dimension of the position vector. Must match the number of axes in the axis convention (see MC Group Coordinated Motion or MC Group with Pick-and-Place).

Velocity

MC_LREAL

The maximum velocity for the programmed segment. The velocity does not always have to be reached. The velocity must be set >0.

Acceleration

MC_LREAL

Maximum path acceleration for the programmed segment. Special input values can be used. MC_DEFAULT executes the command with default axis values. MC_MAXIMUM executes the command with the maximum axis values. The acceleration must be set ≥1.

Deceleration

MC_LREAL

Maximum path deceleration for the programmed segment. Special input values can be used. MC_DEFAULT executes the command with default axis values. MC_MAXIMUM executes the command with the maximum axis values. The deceleration must be set ≥1.

Jerk

MC_LREAL

Path jerk for the programmed segment. Special input values can be used. MC_DEFAULT executes the command with default axis values. The jerk must be set ≥100.

From TF5400 V3.2.27:
MC_MAXIMUM is supported for MC Group Coordinated Motion. Here MC_MAXIMUM = 100 * MC_DEFAULT.

BufferMode

MC_BUFFER_MODE

Defines how successive motion commands are to be processed (see MC_BUFFER_MODE).

Transition mode

MC_TRANSITION_MODE

Defines the blending mode (see MC_TRANSITION_MODE).

TransitionParameter

POINTER TO LREAL

Pointer to array [1..TransitionParameterCount] of blending parameters. Transition parameters define the blending from the last programmed position (see MC_TRANSITION_MODE).

TransitionParameterCount

UDINT

Number of blending parameters (see MC_TRANSITION_MODE).

InvokeId

UDINT

Segment ID for analysis purposes.

DynamicConstraints

REFERENCE TO IPlcDynamicConstraint

From TF5400 V3.2.27, MC Group Coordinated Motion:
Optional input to further limit the allowed values for velocity, acceleration, deceleration or jerk during motion.

MC_MoveLinearAbsolutePreparation 6: MC_MoveLinearAbsolutePreparation 7: VAR_IN_OUT

VAR_IN_OUT
    PathData                 : MC_PATH_DATA_REF;
END_VAR

Name

Type

Description

PathData

MC_PATH_DATA_REF

Table containing the segments of a path. The table is written by MC_Move…Preparation and executed by MC_MovePath (see MC_PATH_DATA_REF).

MC_MoveLinearAbsolutePreparation 8:

Resetting a table

A table is not reset during execution. To reset, the method ClearPath() must be called from MC_PATH_DATA_REF.

MC_MoveLinearAbsolutePreparation 9: VAR_OUTPUT

VAR_OUTPUT
    Error                    : BOOL;
    ErrorId                  : UDINT;
END_VAR

Name

Type

Description

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

TF5400 Advanced Motion Pack V3.1.1.17

PC or CX (x86 or x64)

Tc3_McCoordinatedMotion, Tc2_MC2