Definition of a machining coordinate system (CS)

Defining and storing a CS:

#CS DEF [ [<CS-ID>] ] [ <v1>,<v2>,<v3>,<φ1>,<φ2>,<φ3> ]                                                       (modal)


Define and store with simultaneous activation:

#CS ON [ [<CS-ID>] ] [ <v1>,<v2>,<v3>,<φ1>,<φ2>,<φ3> ]                                                         (modal)

#CS ON [<CS-ID>]                                  Select a stored CS                                   (modal)

#CS ON                                                 Select the last CS defined                                   (modal)

#CS OFF                                                Deselect the last CS activated                                  (modal)

The CS-ID parameter may not be programmed here since it is only permitted to deselect the last CS activated.

<CS-ID>

Coordinate system ID. The CS-ID is assigned the default value 1 at program start. If the CS-ID is not programmed with #CS DEF or #CS ON, the next free CS-ID is determined instead. However, a CS of this type is not longer available after it is deselected with #CS OFF!

At the same time, a maximum of 5 CS definitions can be stored.

<vi>

Components of the translatory offset vector in [mm, inch]. (These refer to the main axes in the sequence contained in G17).

<φi>

Angle of rotation in [°].

A CS (PCS processing coordinate system) is characterised by the relative offset (V2 in figure below) and the rotation relative to the current work piece coordinate system (WCS). Current zero offset, clamp position offset and reference point offset (V1 in figure below) determine the position of the CS relative to the machine coordinate system (MCS).

Machining on an inclined plane
Machining on an inclined plane

Default setting of rotation sequence and rotation mode:

If the rotations φ1, φ2 and φ3 are defined, they are executed in the default setting in the mathematical positive direction (figure below) in the sequence as listed below:

1. Rotation at angle φ3 about the 3rd axis (e.g. z)

2. Rotation at angle φ2 about the new 2nd axis (e.g. y´)

3rd Rotation at angle φ1 about the 1st axis (e.g. x´´)

This rotation sequence is also referred to as YAW - PITCH - ROLL. The rotations always refer here to the new axes of the currently rotated CS (rotation mode).

(The specified axis sequence of the axes always corresponds to the sequence of the main axes at G17, irrespective of G17/G18/G19).

Definition of a CS by 3 rotations referred to the new axes
Definition of a CS by 3 rotations referred to the new axes

Free definition of rotation sequence and rotation mode:

Every orientation in space can be reached by concatenating three basic rotations. There are 6 possible rotation sequences about 2 axes (known as classic Euler angles) and 6 rotation sequences about 3 axes (known as Tait-Bryan angles).

Rotations either refer to fixed axes in space (extrinsic rotation) or to the new axes of the currently rotated CS (intrinsic rotation). The figure below shows this difference compared to the figure above.

Definition of a CS by 3 rotations about fixed axes in space
Definition of a CS by 3 rotations about fixed axes in space

The rotation sequence can be configured with P-CHAN-00394. This rotation sequence can be changed in the NC program by the following command:

#CS MODE ON [ROTATION_SEQUENCE=<rot_sequence>]                                                  (modal)

<rot_sequence>

Rotation sequence as string according to:

 

Euler angles

Tait-Bryan angles

 

XYX, XZX, YXY, YZY, ZXZ, ZYZ

XYZ, XZY, YXZ, YZX, ZXY, ZYX (default)

Deselecting and restoring default setting by:

#CS MODE OFF [ROTATION_SEQUENCE]                                                                             (modal)

In the default setting, rotation is always executed about the new axis of the currently rotated CS (YAW - PITCH - ROLL). The following command can change this rotation mode in the NC program to rotations about fixed axes in space:

#CS MODE ON [ROTATION_MODE_FIXED]                                                                            (modal)

ROTATION_MODE_FIXED

Rotation about (fixed) axes in space of the coordinate system at rotation state

Deselecting and restoring default setting by:

#CS MODE OFF [ROTATION_MODE_FIXED]                                                                           (modal)

Without #CS MODE OFF [...] all settings remain active until main program end (M30) or RESET. After next program start, the default settings are again valid.

The position (with respect to the current WKS) of a CS that has been defined via #CS DEF [<CS-ID>] [...] or CS ON [<CS-ID>] [...] is stored and can be re-selected via #CS ON without a specification of parameters. However, if the overall offset in the MCS is modified in the meantime, the CS has a new position relative to the MCS.

Zero offsets and reference point offsets may be programmed in the CS during machining. However, these values are only valid until the CS is deselected and are not saved.

The axis designations are retained in the CS.

Programing Example

prg_example

Example 1

N005 P1 = 2

N010 #CS DEF [1][P1,15,5,20,30,45] (Define and save a CS)
                                   (and ID 1)

                                   (Relative offsets: X2, Y15, Z5)

                                   (Rotations: 45° about Z,30° about Y',20° about X'')

N020 #CS ON[1]                     (Activate CS with ID 1)

:

:

N100 #CS OFF                       (Deselect CS with ID 1)

:

:

N200 P1=10

N210 #CS ON [P1,15,5,2,3,60]       (Define and activate a CS)

                                   (under the automatically defined ID 2)

:

:

N300 #CS OFF    (Deselect the last CS activated (ID2))

                (Then the CS is deleted with ID2.)

:

N400 M30

Programing Example

prg_example

Example 2

N05 P1 = 2

N10 #CS DEF [3][P1,15,5,2,3,4.5]     (Define and save)
                                     (a CS under ID 3)

N20 #CS DEF [2][P1,15,5,2,3,4.5]     (Define and save)
                                     (a CS under ID 2)

N30 #CS DEF [5][0,1,2,0,30,30]       (Define and save)
                                     (a CS under ID 5)

N30 #CS ON                           (Activate the CS with)
                                     (last programmed ID 5)

:

N50 #CS OFF

N60 #CS ON [3]                       (Activate CS with ID 3)

:

N80 #CS OFF

N90 #CS DEF [3][1,1.2,1.3,0,0,33]    (Redefine the CS with ID 3)

:

M30

Programing Example

prg_example

Example 3

If several coordinate systems are selected in succession, e.g. with CS ON [...] (without CS_ID), they form a new linked total CS. This must be deselected step by step by a corresponding #CS OFF.

It is permitted to select combined CS’s with and without CS IDs but this is not recommended for the sake of program clarity.

Example of multiple programming of CS (without CS_ID):

N010 #CS ON [0,0,0,0,0,20]  (Define and activate a CS under)
                            (automatically defined ID 1)

                            (No offsets, only rotation 20° about Z)

:

:

N050 #CS ON [0,0,0,0,0,30]  (Define and activate a CS under)
                            (automatically defined ID 2)

                            (No offsets, only rotation 30° about Z)

->(This results in a total CS with a rotation of 50° about Z)

:

N100 #CS OFF    (Deselect CS with ID 2, then the CS)

                (deleted with ID 2.)

->(CS with ID 1 with a rotation of 20° about Z remains active)

:

:

N200 #CS OFF    (Deselect CS with ID 1, then the CS)

                (is deleted with ID 1 and all CS’s are deselected.)

:

:

N400 M30