Cartesian transformation

The position and orientation of a tool in space is described in relation to a coordinate system using coordinates. The following two conventions are available for this, which are described in more detail below:

  • Cartesian coordinates
  • Cylinder coordinates
Cartesian coordinates

A Cartesian coordinate system consists of three coordinate axes X, Y and Z that are perpendicular to each other. These axes can be used to clearly describe positions in the three-dimensional workspace.

In addition to the position, the orientation of an object (coordinate system) can also be described. Three cardan angles A, B and C around the coordinate axes X, Y and Z are used for this purpose. These three angles describe the orientation of a coordinate system through three successive rotations around X (angle A), then around the co-rotated Y' axis (angle B) and finally around the co-rotated Z'' axis (angle C).

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

Please note!

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

Cylinder coordinates

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

Firstly, R defines the distance of a point from the Z-axis of a reference system. The angle PHI rotates this point around this axis in a mathematically positive sense. Finally, the point is shifted parallel to the Z-axis by the height H. In this way, every point in the three-dimensional workspace can be uniquely described by these three coordinates.

  • Cylindrical coordinates are particularly suitable for rotationally symmetrical kinematics (e.g. rotating positioning tables).
  • Orientations are represented by the cardan angles A, B and C, analogue to the Cartesian coordinate system.
Function blocks for Cartesian transformations

The function blocks for Cartesian transformations provide the calculations required to define a PCS relative to the MCS and to 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

Perform Cartesian transformation (MCS <--> PCS)

MC_SetCoordinateTransform

Perform coordinate transformation (MCS <--> PCS)

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

Please note!

Note when using 4D kinematics:

If a movement is programmed using a product coordinate system (e.g. target position specified in PCS_4: MC_MoveLinearAbsolute1.CoordSystem := L_MC4P_CoordSystem.PCS_4), the z-axis of the PCS must be aligned with or against the z-axis of the WCS!

See also: Special treatments for 4D kinematics

Data structure MC_COORD_REF

The MC_COORD_REF data structure contains the coordinate transformation:

Identifier

Data type

Cartesian coordinates

Cylinder 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 the X-axis of the MCS)

B

LREAL

Cardan angle B (around co-rotated Y' axis)

C

LREAL

Cardan angle C (around co-rotated Z''-axis)