IF_RobotMotion - TransformCoordinate (Method)

Overview

Type:

Method

Available as of:

V2.3.1.0

This chapter provides information on:

Task

Transform a position from a source coordinate system into a target coordinate system

Description

With the method TransformCoordinate(...) a position, described by the Cartesian X, Y and Z coordinates in a predefined coordinate system, can be transformed into the corresponding position, described in another coordinate system.

A successful call generates an application logger entry with LogLevel.UserAction. It includes the inputs as well as the result of the transformation.

In case the transformation was not successful, an application logger entry with LogLevel.Exception and a corresponding error string is created.

Interface

Input

Data type

Description

i_stPosition

PDL.ST_Vector3D

Cartesian position described in the source coordinate system passed at input i_etCoordinateSystem.

i_etSourceCoordinateSystem

ET_CoordinateSystem

Source coordinate system

i_etTargetCoordinateSystem

ET_CoordinateSystem

Target coordinate system

Output

Data type

Description

q_etDiag

GD.ET_Diag

General, library-independent statement on the diagnostic.

A value not equal to GD.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.

Return Value

Data type

Description

PDL.ST_Vector3D

Transformed position described in the target coordinate system.

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

Ok

0

Ok

OK

IdenticalCoordinateSystem

183

The coordinate system is identical.

ExecutionAborted

ExternalPositionSourceConfigured

205

The external position source is configured.

InputParameterInvalid

CoordinateSystemInvalid

117

The coordinate system is invalid.

InputParameterInvalid

CoordinateSystemNotConfigured

172

The coordinate system is not configured.

UnexpectedProgramBehavior

UnexpectedFeedback

13

A feedback value was invalid.

CoordinateSystemInvalid

Enumeration name:

CoordinateSystemInvalid

Enumeration value:

117

Description:

The coordinate system is invalid.

Issue

Cause

Solution

Transforming the coordinates was not successful.

The value transferred at the input i_etSourceCoordinateSystem or i_etTargetCoordinateSystem is invalid.

At the inputs i_etSourceCoordinateSystem, and i_etTargetCoordinateSystem, a value of ET_CoordinateSystem must be transferred.

Refer to q_sMsg for detailed information.

CoordinateSystemNotConfigured

Enumeration name:

CoordinateSystemNotConfigured

Enumeration value:

172

Description:

The coordinate system is not configured.

Issue

Cause

Solution

Transforming the coordinates was not successful.

The requested coordinate system at the input i_etSourceCoordinateSystem or i_etTargetCoordinateSystem is not configured.

If required, configure a coordinate system of type ET_CoordinateSystem using the corresponding method.

Refer to q_sMsg for detailed information.

ExternalPositionSourceConfigured

Enumeration name:

ExternalPositionSourceConfigured

Enumeration value:

205

Description:

The external position source is configured.

Issue

Cause

Solution

Transforming the coordinates was not successful.

An external position source for the robot components cartesian, orientation and auxiliary axes is configured.

Transforming the coordinates from or into tracking coordinate systems is not possible when an external position source for the robot components is configured.

IdenticalCoordinateSystem

Enumeration name:

IdenticalCoordinateSystem

Enumeration value:

183

Description:

The coordinate system is identical.

The transformation was successful. The result of the transformation is equal to its input.

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Ok

The transformation was successful.

UnexpectedFeedback

Enumeration name:

UnexpectedFeedback

Enumeration value:

13

Description:

A feedback value was invalid.

Transforming the coordinates was not successful.

The transformation was aborted because of an invalid feedback value.