Cartesian transformation

The position and orientation of a tool in space is described by coordinates with reference to a coordinate system. For this purpose, the following two conventions are available that are described in more detail in the following:

  • Cartesian coordinates
  • Cylindrical coordinates
Cartesian coordinates

A Cartesian coordinate system consists of three coordinate axes X, Y and Z perpendicularly oriented to each other. By means of these axes, positions can be described unambiguously in the three-dimensional workspace.

In addition to the position, the orientation of an object (coordinate system) can be described. For this purpose, three Cardan angles A, B and C are used around the coordinate axes X, Y and Z. These three angles describe the orientation of a coordinate system by three successive rotations around X (angle A), then around the Y' axis (angle B) rotating simultaneously and finally around the Z'' axis (angle C) rotating simultaneously.

[16-5] Coordinate axes X, Y and Z in the Cartesian coordinate system

Note!

The sequence of the rotations made in succession can be selected via the Offset0-Subindex39 parameter. The above example describes the behaviour in the standard setting 0: Intrinsic x-y'-z" rotation.

Cylindrical coordinates

A position is described in cylindrical coordinates by a radius R, an angle PHI and a height H.

First, R defines the distance of a point from the z axis of a reference system. The angle PHI rotates this point in a mathematically positive sense around this axis. Finally, the point is shifted in parallel to the z axis by the height H. Thus, each point can be described unambiguously by these three coordinates in the three-dimensional workspace.

  • Cylindrical coordinates are especially suitable for rotation-symmetrical kinematics (e.g. rotary positioning tables).
  • Orientations are represented by the Cardan angles A, B and C by analogy with Cartesian coordinate system.
Function blocks for Cartesian transformations

The function blocks for Cartesian transformations provide the required calculations in order to define a PCS relatively to the MCS and read out the current transformation between MCS and PCS.

Function block

Info

MC_ReadCartesianTransform

Read parameters of the active Cartesian transformation (MCS <--> PCS)

MC_ReadCoordinateTransform

Read active coordinate transformation (MCS <--> PCS)

MC_SetCartesianTransform

Execute Cartesian transformation (MCS <--> PCS)

MC_SetCoordinateTransform

Execute coordinate transformation (MCS <--> PCS)

For defining the convention (Cartesian coordinates or cylindrical coordinates), the L_MC4P_CoordType enumeration type is available which is an element of the MC_COORD_REF data structure (see the following section).

Note!

Observe the following when using 4D kinematics:

If a motion is programmed via a product coordinate system (e.g. target position given in PCS_4: MC_MoveLinearAbsolute1.CoordSystem := L_MC4P_CoordSystem.PCS_4), the z axis must be aligned to or opposed to the z axis of the WCS!

See also: Special handling of 4D kinematics

MC_COORD_REF data structure

The MC_COORD_REF data structure contains the coordinate transformation:

Designator

Data type

Cartesian coordinates

Cylindrical coordinates

CoordType

L_MC4P_
CoordType

Type of coordinate system for Cartesian transformation:

  • Cartesian : Cartesian coordinates
  • Cylindric : Cylindrical coordinates

X

LREAL

X coordinate

Radius R

Y

LREAL

Y coordinate

Angle PHI

Z

LREAL

Z coordinate

Height H

A

LREAL

Cardan angle A (around x axis of the MCS)

B

LREAL

Cardan angle B (around Y' axis rotating simultaneously)

C

LREAL

Cardan angle C (around Z'' axis rotating simultaneously)