MC_RegisterCompensation

MC_RegisterCompensation 1:

Reference to a mover template: An axis refers to a mover template via the function block MC_RegisterCompensation.

MC_RegisterCompensation 2: Inputs

VAR_INPUT
    Execute          : BOOL;
    CompensationType : MC_COMPENSATION_TYPE;
    CompensationId   : OTCID;
END_VAR

Name

Type

Description

Execute

BOOL

This function block activates the selected compensation type when a rising edge is triggered at its Execute input. When activated, the geometry information for geo-compensation is taken into account by the Motion function blocks that refer to Axis.

CompensationType

MC_COMPENSATION_TYPE

Select mcTypeGeoCompensation for geo-compensation (see MC_COMPENSATION_TYPE).

CompensationId

OTCID

This input CompensationId is of type OTCID and can therefore refer to a mover template. The reference to the geometry information required for geo-compensation is made via the object ID CompensationId, which refers to a mover template.

MC_RegisterCompensation 3: Inputs/outputs

VAR_IN_OUT
    Axis  : AXIS_REF;
END_VAR

Name

Type

Description

Axis

AXIS_REF

The input Axis is of type AXIS_REF and refers to an axis, e.g. to a mover.

MC_RegisterCompensation 4: Outputs

VAR_OUTPUT
    Done    : BOOL;
    Busy    : 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 or Error is set.

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.

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT V3.1.4022.25
TF5400 Advanced Motion Pack V3.1.6.03

PC or CX (x64)

Tc3_McCollisionAvoidance,
Tc3_McCoordinatedMotion, Tc2_MC2