MC_PATH_DATA_REF

MC_PATH_DATA_REF 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_PATH_DATA_REF 2:

MC_PATH_DATA_REF 3:

MC_PATH_DATA_REF 4:

MC_PATH_DATA_REF represents the path to be executed by MC_MovePath, where the number of entries is limited to 30. The path to be executed is written by MC_MoveLinearAbsolutePreparation, MC_MoveCircularAbsolutePreparation and MC_BlockerPreparation. It is initialized with a pointer to a user-defined buffer. Here the user can define the size of the path. The initialization must be done during the declaration. The path table is not reset during execution. To reset, the method ClearPath must be called.

VAR_OUTPUT

VAR_OUTPUT
    FilledRows            : UDINT;
    OccupiedBuffer        : UDINT;
END_VAR

Name

Type

Description

FilledRows

UDINT

Number of path entries (e.g. path segments).

OccupiedBuffer

UDINT

Occupied buffer size in bytes. By analyzing this output, the user can check whether the end of the defined buffer is reached.

Example

The example below shows how to declare a path reference and how to reset an existing path.

VAR
    buffer          : ARRAY[1..4096] OF BYTE;
    Path            : MC_PATH_DATA_REF(ADR(buffer), SIZEOF(buffer));
END_VAR
//delete all segments of path table
Path.ClearPath();
MC_PATH_DATA_REF 5:

The data type MC_PATH_DATA_REF is part of the Motion Control (MC) library. Use the ClearPath() method to clear path information of type MC_PATH_DATA_REF to reset an existing path. For the data type MC_PATH_DATA_REF use only Motion Control functions or Motion Control function blocks. In particular, do not use memory functions such as MEMCMP, MEMCPY, MEMSET or MEMMOVE for the data type MC_PATH_DATA_REF.

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