Exchanging spindles in coordinated motion (#CAX)

This "basic mode" is required in particular for C axis machining on lathes because in this case the position-controlled spindle has to be converted into a rotary path axis (e.g "C").



C axis machining is also possible on milling machines or machining centres which are designed with rotary workpiece fixtures (e.g. revolving base). In this case, it is not necessary to select #CAX.

The three physical axes X, Y, Z and the C axis replaced in coordinated motion can be directly programmed. Linear axes are programmed in Cartesian coordinates and the C axis in angle units.

Radius and diameter programming depends on G52/G51.

The two linear axes define the main plane.

ZX (G18) or YZ (G19).

#CAX [ [ [<main_spindle_name>, ] <C_axis_name> ] ]


Only the main spindle name can be programmed according to P-CHAN-00053. If a spindle other than the C axis is used, it must first be declared as the main spindle (see programming example in Section [PROG// Changing the main spindle]). Otherwise, an error message is output.


Freely definable name of the C axis in the NC program. If no C axis name is programmed, the default name from P-CHAN-00010 is used.

The main plane (circular interpolation, tool radius compensation, etc.) remains the same as before activation of the C axis.

An error is generated if a command for this spindle (M3, M4, M5, etc.) is programmed although the axis is still declared as a C axis in the coordinated motion.

The C axis is deselected, i.e. the axis is released to the spindle interpolator, by the following:


Programing Example


C axis machining

Exchange spindles in coordinated motion


#CAX                        ; Assuming: default C axis is "C"

G01 G90 X50 Z10 C90 F200

#CAX OFF                    ; deselect C axis mode


#CAX[S, C] or #CAX[C]     ; Assuming: main spindle is "S"

G01 G90 X50 Z10 C90 F200



#MAIN SPINDLE [S2]          ; “S2” becomes new main spindle “S”

#CAX[S, C]                  ; select C axis mode

G01 G90 X50 Z10 C90 F200


#CAX OFF                    ; deselect C axis mode


#CAX[S3, C]; Error, “S3“ is not the main spindle