Coordinate transformation between coordinate systems (#TRANSFORM)

The #TRANSFORM command is used to convert any coordinates of a 3D point from one stack level to another stack level in the NC program based on the current CS stack. The transformation calculation required for this consists of a combination of kinematic and Cartesian forward or backward transformation, depending on the structure of the CS stack.

Auxiliary and additional axes are only taken into account in the transformation calculation with regard to their zero point displacements between the stack planes.

The #TRANSFORM command is also used for transformations that are already active (#CS SELECT) in the channel.

Syntax of Transformation command:

#TRANSFORM [<CS_source>] [<CS_dest> ] [POS_X>, <POS_Y>, <POS_Z> ] [ [ {<POS_aux>=..} ] ]

<CS_source>

Name of the tracked CS with maximum of 8 characters.

<CS_dest>

Name of the destination CS with maximum of 8 characters.

<POS_X, Y, Z>

3 components of the point to be transformed in [mm, inch] in the input CS.

<POS_aux>=..

Input coordinates of the auxiliary and additional axes

Notice

notice

An error message is generated it:

  1. the name of a coordinate system is not defined
  2. 3 input coordinates are not programmed

The result of the transformation calculation is supplied in special axis-specific variables (V.A.). The axis can be programmed either by name or by axis index:

Syntax of Result variables

V.A.TRANSFORM.<axis_name>      Axis-specific coordinate after calculation in [mm, inch]

or

V.A.TRANSFORM[<axis_index>]     Axis-specific coordinate after calculation in [mm, inch]

 

Programing Example

prg_example

The following examples show the schematic use of the #TRANSFORM command in a CS stack that consists of kinematic and Cartesian transformations. Specifying the input and target coordinate system determines whether the calculation requires a forward or backward transformation.

Example 1, basic configuration is a 5-axis kinematic with CS stack.

Transformation for the point (50,0,10) with tracking axis positions A10 and B20 from the ACS system to the WCS system. A kinematic Cartesian forward transformation is executed.

#TRANSFORM [ACS] [WCS] [50, 0, 10] [A10 B20]

Example: forward transformation with #TRANSFORM
Example: forward transformation with #TRANSFORM

Example 2, basic configuration is a 5-axis kinematic with CS stack.

Transformation for the point (10,-10,15) with tracking axis positions A45 and B90 from the MCS system to the ACS system. A simple kinematic backward transformation is executed.

#TRANSFORM [MCS] [ACS] [10, -10, 15] [A45 B90]

Example: backward transformation with #TRANSFORM
Example: backward transformation with #TRANSFORM