Auxiliary functions for coordinate transformation (#WCS TO MCS, #MCS TO WCS)

Notice

notice

Not included in the scope of the standard license. The use of this feature requires a license for the "Transformations” extension package.

On 5-axis machines and machines with non-Cartesian axis structure (e.g. hexapods), two typical variants are used to define path motions.

1st case: The user programs the contour in space with circles, straight lines or polynomials and the tool tip (TCP) is moved along the path depending on the programmed contour.

2nd case: The user programs the target point in space or workpiece coordinates (WCS) which are mapped onto machine coordinates (MCS). Depending on the maximum possible velocities in the axes, the TCP moves on a non-predictable curve (PTP). Due to the loss of TCP motion along a curve in space, the PTP motion is generally faster than the TCP path motion.

The above mentioned mapping of programmed WCS target points onto MCS target points (backward transformation) can be executed in the NC program by the following NC commands. The user must then calculate the approach of the calculated MCS target points explicitly in absolute dimensions.

For example, this method can be used to move each single axis sequentially out of a collision area.

Attention

attention

These commands only can be used with inactive transformation (#TRAFO OFF) and when the coordinate system is inactive (#CS OFF (ALL)).

Syntax of Calculating machine coordinates (MCS) from workpiece coordinates (WCS):

#WCS TO MCS [ [CS..] [KIN [ IS[<kin_id>]=..] ] ]

CS..

Calculate the target points taking into consideration an inactive Cartesian transformation with a specific valid ID.

KIN

Calculate the target points taking into consideration the currently valid kinematic transformation which is however inactive.

IS[<kin_id>]=..

For kinematic transformations consisting of partial kinematics with several solutions, the required solution can be specified using an additional IS value, see Status & Turn.

The kinematic ID of IS addresses the partial kinematic which has several solutions. The status value described the required pose.

Available as of V3.1.3080.13

The following axis-specific variables are provided to declare the WCS target points and store the calculated MCS target points. These variables permit write and read access:

V.A.WCS.*

Access to the axis-specific auxiliary variable "workpiece coordinate" (WCS). The value does not correspond to the programmed workpiece coordinates when transformation is active.

V.A.MCS.*

Access to the axis-specific auxiliary variable machine coordinate (MCS). The value does not correspond to the programmed machine coordinates when transformation is inactive.

Programing Example

prg_example

Default backward transformations with #WCS TO MCS

The NC calculates the MCS target points using the Cartesian and kinematic backward transformation of specific WCS points. The user can access the calculated MCS positions using NC programming and reuse them in the NC program. The user defines the transformations which are to be executed by specifying the keywords and the associated CS IDs.

N02 #CS DEF[1][0,0,0,0,0,45]

N00 #KIN ID [1]

N10 V.A.WCS.X=10

N20 V.A.WCS.Y=10

N30 V.A.WCS.Z=100

N40 #WCS TO MCS[CS1, KIN] ;transformation of WCS to MCS

N50 G00 Z=V.A.MCS.Z ;move single axes to MCS target points

N60 G00 X=V.A.MCS.X

N70 G00 Y=V.A.MCS.Y

N…

:

Incorrect use:

N05 #CS DEF[1][0,0,0,0,0,45]

N10 #CS ON[1]

N20 V.A.WCS.X=100

N30 V.A.WCS.Y = 0

N40 V.A.WCS.Z = 0

N50 #WCS TO MCS [CS1] <- not permitted since a CS is active

N05 #KIN ID[12]

N10 #TRAFO ON

N20 V.A.WCS.X=100

N30 V.A.WCS.Y = 0

N40 V.A.WCS.Z = 0

N50 #WCS TO MCS [KIN] <- not permitted since a transformation is active

Programing Example

prg_example

Backward transformations with #WCS TO MCS where kinematic transformations have several solutions

For kinematic transformations with several WCS solutions for a MCS value the required solution can be specified by the IS value (“Status”).

N10 #KIN ID[45]

N20 #WCS TO MCS[KIN IS[45]='0b010']

:

;uses with couple kinematic (kinematic type 210), consisting of
;partial kinematic with ID 45 (several solutions) and partial kinematic
;with ID 91 (one solution):

N10 #KIN ID[210]

N20 #WCS TO MCS[KIN IS[45]='0b010']

:

N10 #KIN ID[45]

N20 #WCS TO MCS[KIN IS='0b010'] <- not permitted since no partial kinematic ID was specified for IS

N10 #KIN ID[210]

N20 #WCS TO MCS[KIN IS[91]='0b010'] <- not permitted since partial kinematic 91 does not have several solutions

The inverse mapping of MCS target points to WCS target points (forward transformation) is executed with the following command. For example, this method can be used to map measured values in the WCS (normally determined in the MCS).

Syntax of Calculating workpiece coordinates (WCS) from machine coordinates (MCS):

#MCS TO WCS [ [CS..] [KIN] ]

CS..

Calculate the target points taking into consideration an inactive Cartesian transformation with a specific valid ID.

KIN

Calculate the target points taking into consideration the currently valid kinematic transformation which is however inactive.