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:up to and including v3.2)

MC_PATH_DATA_REF 5:

MC_PATH_DATA_REF represents the path to be executed by MC_MovePath, whereby 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. Hereby the user can define the size of the path. The initialization has to be done during declaration. The path table is not reset at execution. To reset, the method ClearPath must be called.

MC_PATH_DATA_REF 6: Outputs

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 byte. By analyzing this output the user can analyze if the end of the defined buffer will be reached.

Sample

The sample 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 7:

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

Requirements

Development environment

Target platform

PLC libraries
to include

TwinCAT V3.1.4018.26

TF5400 Advanced Motion Pack V3.1.1.17

PC or CX (x64)

Tc3_McCoordinatedMotion, Tc2_MC2