MC_GroupReadTrajectoryInformation

MC_GroupReadTrajectoryInformation 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_GroupReadTrajectoryInformation 2:

MC_GroupReadTrajectoryInformation 3:

MC_GroupReadTrajectoryInformation 4:

The MC_GroupReadTrajectoryInformation function block reads information about the current and next segments in the path.

MC_GroupReadTrajectoryInformation 5: Inputs

VAR_INPUT
    Enable     : BOOL;
END_VAR

Name

Type

Description

Enable

BOOL

The command is executed as long as Enable is active.

MC_GroupReadTrajectoryInformation 6:/MC_GroupReadTrajectoryInformation 7: Inputs/Outputs

VAR_IN_OUT
    AxesGroup  : AXES_GROUP_REF;
END_VAR

Name

Type

Description

Axes

AXES_GROUP_REF

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

MC_GroupReadTrajectoryInformation 8: Outputs

VAR_OUTPUT
    Valid      : BOOL;
    Error      : BOOL;
    ErrorId    : UDINT;
    EntryCount : UDINT;
    Entries    : ARRAY [1..10] OF MC_TRAJECTORY_ENTRY;
END_VAR

Name

Type

Description

Valid

BOOL

This output indicates that other output values are valid for this function block.

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

EntryCount

UDINT

Number of returned information on the next path segments.

Entries

ARRAY [1..10] OF MC_TRAJECTORY_ENTRY

Information on the next rail segments

Example

VAR
    stGroupRef : AXES_GROUP_REF;
    ReadInfo   : MC_GroupReadTrajectoryInformation;
    Data       : ARRAY [1..10] OF MC_TRAJECTORY_ENTRY;
END_VAR
ReadInfo(
    AxesGroup  := stGroupRef,
    Enable     := TRUE,
    Valid      => ,
    Error      => ,
    ErrorId    => ,
    EntryCount =>,
    Entries    => Data);

Possible information in 'Data':

Data[1].InvokeID                 :=  10;
Data[1].Active                   := TRUE;
Data[1].RemainingCartesianLength := 100; // mm
Data[1].RemainingDuration        :=   1; // s

Data[2].InvokeID                 :=  20;
Data[2].Active                   := FALSE;
Data[2].RemainingCartesianLength := 500; // mm
Data[2].RemainingDuration        :=   5; // s

Data[3].InvokeID                 :=  25;
Data[3].Active                   := FALSE;
Data[3].RemainingCartesianLength := 150.0; // mm
Data[3].RemainingDuration        :=   1.2; // s

Data[4].InvokeID                 :=  30;
Data[4].Active                   := FALSE;
Data[4].RemainingCartesianLength := 250.00; // mm
Data[4].RemainingDuration        :=   3.23; // s

Requirements

Development environment

Target platform

PLC libraries
to include

TF5400 Advanced Motion Pack V3.4.45

PC or CX (x64)

Tc3_McCoordinatedMotion, Tc2_MC2