IF_AdditionalTransformationTCP - Direct (Method)

Overview

Type

Method

Available as of:

V2.6.1.0

This chapter provides information on:

Task

Calculating the forward transformation of the additional user-defined transformation for the TCP (Tool Center Point).

Description

With the method Direct(), the forward transformation of the additional user-defined transformation for the TCP (Tool Center Point) can be calculated. The inputs represent the current positions of the TCP and the auxiliary axes.

When a value unequal to zero for an unconfigured TCP component (q_stPositionTCP.lrX / lrY / lrZ) is calculated and transferred to the robot, the robot returns the diagnostic message ET_Diag.ExecutionAborted / ET_DiagExt.ComponentNotConfigured.

In case AdditionalTransformationAxes(…) is also configured, the data flow is as follows.

Interface

Input

Data type

Description

i_stPositionTCP

PDL.ST_Vector3D

Position of TCP.

i_alrPositionAuxAx

ARRAY [ET_RobotComponent.AuxAx1 .. ET_RobotComponent.AuxAxAll + Gc_udiMaxNumberOfAuxiliaryAxes] OF LREAL

Position of auxiliary axes.

i_xChange

BOOL

TRUE: A change of the additional transformation TCP was requested. The change must be done for the Direct and Inverse transformation at the same time.

FALSE: No change of the additional transformation TCP was requested.

Output

Data type

Description

q_etDiag

GD.ET_Diag

General, library-independent statement on the diagnostic.

A value not equal to ET_Diag.Ok corresponds to a diagnostic message.

q_etDiagExt

ET_DiagExt

POU-specific output for the diagnostic.

q_etDiag = ET_Diag.Ok -> Status message

q_etDiag <> ET_Diag.Ok -> Diagnostic message

q_sMsg

STRING[80]

Event-triggered message that gives additional information on the diagnostic state.

q_stPositionTCP

PDL.ST_Vector3D

Position of TCP.

Implementation Example of Method Direct()

Declaration:

METHOD Direct
VAR_INPUT
  i_stPositionTCP    : PDL.ST_Vector3D..
  i_alrPositionAuxAx : ARRAY [ROB.ET_RobotComponent.AuxAx1..
                       (ROB.ET_RobotComponent.AuxAxAll + 
                       ROB.Gc_udiMaxNumberOfAuxiliaryAxes)] OF LREAL;
  i_xChange          : BOOL;
END_VAR
VAR_OUTPUT
  q_etDiag           : GD.ET_Diag := GD.ET_Diag.Ok;
  q_etDiagExt        : ROB.ET_DiagExt := ROB.ET_DiagExt.Ok;
  q_sMsg             : STRING[80];
  q_stPositionTCP    : PDL.ST_Vector3D;
END_VAR

Implementation:

// Copy inputs to outputs first
q_stPositionTCP   := i_stPositionTCP;

// Implement additional transformation for robot axes here
// For example:
// q_stPositionTCP.lrZ := i_stPositionTCP.lrZ - 50.0;