CNC Machine Axes and Coordinate Systems

Updated

In short

CNC machine axes are defined by ISO 841 using a right-handed Cartesian system: Z is parallel to the spindle, X is usually the longest horizontal axis, Y is perpendicular to both, and A, B and C are rotary axes about X, Y and Z. Programs are written in a work coordinate system (e.g. G54) whose zero is referenced to machine zero.

A CNC machine coordinate system is the set of axes and zero points the control uses to determine tool position relative to the workpiece. Axis names and directions are standardised in ISO 841, so the same logic applies to most milling, turning and other CNC machines.

Right-hand rule

A right-handed Cartesian system is used: with the thumb, index and middle fingers of the right hand held mutually perpendicular, the thumb points to +X, the index finger to +Y and the middle finger to +Z. Positive direction is defined as tool motion relative to the workpiece; if the table moves instead, its physical direction is opposite.

Linear and rotary axes

AxisDefinition
ZParallel to the main spindle; +Z moves the tool away from the workpiece
XUsually horizontal and the longest axis of travel, perpendicular to Z
YPerpendicular to X and Z by the right-hand rule
ARotation about X
BRotation about Y
CRotation about Z
U, V, WSecondary linear axes parallel to X, Y, Z (e.g. in wire EDM U and V offset the wire guides)

The positive direction of a rotary axis follows the right-hand screw rule: with the thumb pointing in the positive linear direction, the curled fingers show positive rotation.

Axes on different machines

MachineAxesNotes
Vertical machining centreX, Y, ZZ vertical, spindle above
Horizontal machining centreX, Y, Z (+ B)Z horizontal; B is the rotary table
LatheX, Z (+ C, Y)Z is the spindle axis, X the diameter; often programmed as diameter
5-axis centreX, Y, Z + A/C or B/CDepends on kinematics
Wire EDMX, Y, U, V (+ Z)U, V for taper cutting

Zero points

PointDescription
Machine zero (M)Fixed point set by the builder, origin of the machine coordinate system
Reference point (R)Point the axes home to after power-on (with incremental encoders); with absolute encoders homing is often unnecessary
Work zero (W)Point on the workpiece chosen by the programmer – program coordinates are measured from it
Tool reference pointSpindle nose or tool holder gauge line from which tool length is measured

Work coordinate systems (G54–G59)

On Fanuc and similar controls the position of work zero in the machine system is stored in the offset table G54–G59 (and extended offsets such as G54.1 P1…). The operator sets zero with a probe, edge finder or indicator. When G54 is called in the program, all coordinates are measured from this point. Siemens controls similarly use G54–G57 and G505–G599, while Heidenhain uses datum tables and cycles. More on codes in G-code basics.

Tool offsets

  • Length offset (Fanuc G43 Hn) – the control adds the tool length, so the program is written for the tool tip.
  • Radius compensation (G41/G42 Dn) – the control offsets the path by the tool radius; dimensions can be adjusted by changing only the offset value.
  • Turning offsets – X and Z offsets and tool nose radius compensation (G41/G42 with a tool tip orientation code).

Absolute and incremental coordinates

In G90 mode coordinates are given from work zero, in G91 from the current tool position. Lathe controls often write incremental moves with addresses U (in X) and W (in Z). Absolute mode is generally safer because an error in one block does not carry into the next.

Practical tips

  • Choose work zero where it can be set accurately and repeatably – often a drawing datum (see technical drawings for CNC machining).
  • Z zero is often conveniently placed on the top finished face.
  • After a crash or machine repair, verify reference points and offsets.

CNC machining services can be found or requested on the CNC Pasaulis marketplace.

Frequently asked questions

Which CNC axis is Z?

The Z axis is always parallel to the main spindle, and its positive direction moves the tool away from the workpiece.

What are the A, B and C axes?

Rotary axes: A rotates about X, B about Y and C about Z.

What is the difference between machine zero and work zero?

Machine zero is a fixed point set by the builder, while work zero is chosen by the programmer on the part and stored, for example, in G54.

Why is X programmed as a diameter on lathes?

It is more convenient because drawings give diameters. Many lathe controls interpret X as a diameter by default.

Which standard defines CNC axes?

ISO 841, which sets axis names and positive directions for numerically controlled machines.

Looking for someone to do this job? Find a manufacturer on the marketplace or post a request.

Services offered I need a service