CNC Milling Coordinate System Made Easy

Marti Deans Marti Deans April 8, 2021

10 min read

This post is also available in: Français (French) Italiano (Italian) Deutsch (German) 日本語 (Japanese)

You’ll use your CNC milling coordinate system fundamentals everywhere, not just for one particular CNC machine. Even the latest CNC machines are the same at their core: they use an X, Y, and Z-axis to define the coordinate space inside the machine, and a tool (sometimes an endmill, sometimes an extruder, sometimes a laser beam) moves around that space. The technology might change, but the fundamentals remain essentially the same. In this article, we’ll be covering the basics of the CNC coordinate system, including the Cartesian coordinate system, work coordinate system (WCS), and offsets.

Why Do Coordinates Matter for CNC Milling?

Additive machines build a part from the bottom up. There’s no question about where the piece starts on the build plate. However, something like a milling machine has to subtract material away from an external object. To do this, the machine needs to understand the position of the stock in physical space. If only it were as simple as shoving a block of metal into your CNC and pressing go.

CNC machine milling

Things start to get complicated when adding in a variety of milling tools. Each bit has a different length, which changes the distance between the spindle datum and the workpiece. That origin point you just set for a 1″ long endmill isn’t going to work for a 3″ long drill.

milling tools

You can think of the coordinate system as how CNC machines understand 3D space. Without a coordinate system, your CNC would have absolutely no way of knowing:

The coordinate system might seem complicated at a glance, but it can be broken down into simple components. Let’s first start with the basics of the Cartesian coordinate system.

Cartesian Fundamentals

Nearly all CNC machine uses a Cartesian coordinate system based on an X, Y, and Z-axis. This system allows a machine to move in a specific direction along a specific plane.

Reduce the Cartesian system to its basics, and you have a familiar number line. One point on the line gets designated as the Origin. Any numbers to the left of the Origin are negative, while numbers to the right are positive.

number line

Combine the X, Y, and Z axes at 90-degree angles, and you create a three-dimensional space for your CNC machine to move around in. Each axis meets at the Origin.

X Y Z datum point

When two axes connect, they form a Plane. For example, when the X and Y axes meet, you get an XY plane, where most of the work happens on 2.5D parts. These planes are divided into four quadrants, numbered 1-4, with their own positive and negative values.

An easy way to understand the Cartesian coordinate system in relation to your CNC machine is using the Right Hand Rule. Hold your hand out palm up with your thumb and index finger pointed outwards, and your middle finger pointed upwards. Place your hand in front of your CNC machine, aligned with the machine’s spindle, and you’ll see the axes line up perfectly.

How a CNC Machine Uses Coordinates

Using the Cartesian coordinate system, we control CNC machines along each axis to transform a block of material into a finished part. Although it’s difficult to describe axes using relative terms, based on each axis, you typically get the following movements from the perspective of an operator facing the machine:

Put all of this together, and you have a CNC machine that can cut various sides of a workpiece in the XY plane and at various depths along the Z axis. Whether it’s a milling machine, router, or laser, they all use this fundamental movement system.

CNC milling machine axis alignment

The movement of your CNC along the coordinate system is always based on how your tool moves, not the table. For example, increasing the X coordinate value moves the table left, but looking from the perspective of the tool, it’s moving right along a workpiece.

Increasing the Z axis coordinate would move the spindle up, decreasing it would move it down into a workpiece. You are cutting into the piece which corresponds to a negative Z axis coordinate.

If reading that left you more confused than before, don’t worry. Understanding the difference between the movement of your tool and table is easier to show than explain with words. Check out the video below from Robert Cowan to see this in action:

Your CNC Machine’s Origin

Every CNC machine has its own internal origin point called Machine Home. When your CNC first boots up, it has no idea where it is in physical space and requires a calibration to get its bearings.

When this process occurs, all three axes of your CNC move towards their maximum mechanical limit. Once a limit is reached, a signal is sent to a controller which records the home position for that particular axis. When this occurs for all three axes, the machine is now “homed.”

Under the hood, the process can vary from machine to machine. For some machines there is a physical limit switch that signals the controller that a machine has reached an axis limit. On some machines there’s an entire servo system in place that makes this entire process incredibly fluid and precise. A machine controller sends a signal through a circuit board to a servo motor, which connects to each machine axis. The servo motor rotates a ball screw that’s attached to the table on your CNC machine, making it move.

CNC machine servo control

The back and forth movement of the table communicates coordinate changes instantaneously within accuracies up to .0002 inches.

How Machinists Use CNC Coordinates

So far we’ve talked about how a CNC machine uses its internal coordinate system. The problem is, this coordinate system isn’t very easy to reference by us humans. For example, when your CNC finds its home position, it’s typically at extreme mechanical limitations along the X, Y, and Z axes. Imagine having to use these extreme coordinate values as the starting place for your CNC program. What a nightmare.

To make writing CNC programs easier, we use a different coordinate system designed for human manipulation called a Work Coordinate System or WCS. The WCS defines a particular origin point on a block of material, usually in CAM software like Fusion 360.

You can define any point on a block of material as the origin point for a WCS. Once an origin point is established, you will need to locate it inside your CNC machine using an edge finder, dial indicator, probe, or other locating method.

Choosing an origin point for your WCS requires some careful planning. Keep these points in mind when going through the process:

There could be another full blog on selecting the most optimal origin point, especially for each subsequent setup as the tolerance stack-up begins to grow. Make sure you keep in mind the tolerances of previously machined features, your locating mechanism, and your machine to ensure your final part is to spec.

How CNC and Human Coordinates Interact

As we mentioned above, human operators will use a WCS, which provides an easy set of coordinates for writing a CNC program. However, these coordinates are always different from a machine’s coordinates, so how does your CNC machine line the two up? With offsets.

A CNC machine will use a work offset to determine the difference in distance between your WCS and its own home position. These offsets are stored in the machine’s controller and can typically be accessed in an offset table.

Here we can see that several offsets are programmed; G54, G55, and G59. What’s the benefit of having multiple offsets? If you are machining multiple parts in one job, each part can be assigned its own offset. This allows the CNC machine to accurately relate its coordinate system to multiple parts in different places and complete multiple setups at once.

Tool Offsets

It’s pretty common to use multiple tools for the same job, but you need a way to account for different tool lengths. Programming tool offsets into your CNC machine make this easy work. With a tool offset programmed, your CNC machine will know exactly how far each tool extends from the spindle. There are several ways to record a tool offset:

CNC mill tool length offsets
Image courtesy of Practical Machinist.

Putting it All Together

Now that we have all our coordinate fundamentals in place, let’s walk through a set of sample jobs. We’re using a part that was already manually machined to define an outside shape. Now we need to use a CNC machine to drill some holes, pockets, and a slot.

Job 1
We first need to secure and establish our axes and origin point:

CNC job 1

With our WCS in place, our machine now understands the stock position relative to its own internal coordinates. The machining process begins with machining the pocket and drilling holes on the first side of the part.

Job 2
Now the part has to be flipped over to work on the other side. Since we just flipped the part 180 degrees, the outer contour was symmetric, and the previous X and Y offsets were repeatable, the WCS will not change. We are also using the same tool so that the same Z offset can be used.

CNC job 2

One important variable to keep in mind here is the clamping force of your vice. If you haven’t already seen it in your shop, machinists will typically mark the closed position of a vice with a black marker or use a torque wrench. Why are they doing this? To create a consistent clamping pressure when moving or rotating parts. Changes in clamping pressure can lead to differences in the positioning of a part or other failures like part deformation or bowing, depending on part geometry. Assuming that our clamping force is more or less the same, Job 2 can now be machined.

Job 3
Now we need to drill some holes, which requires standing the part on its end. This rotation doesn’t change the XY-origin of the WCS. However, we now have a shorter travel distance between our tool and part.

CNC job 3

This requires a new offset to be used, which will shift the origin point to the top corner of the part. We also removed the parallels to increase gripping surface and lowered the Vice Stop, so it connects with the part’s face instead of the bottom pocket.

We can still use two of our original reference planes here to complete Job 3.

This is a simple example; the part is square, the XY origin was repeatable for all three setups, and even the Z origin only changed once. But the thought process of workholding alignment, repeatability, and accuracy of previous features is important, and you’ll find yourself going through those basic steps again and again.

Locked and Loaded

You’ve now got the precision of CNC coordinate knowledge in your Machinist tool belt. Use it wherever your career takes you! Work Coordinate Systems (WCS) bridge the gap between the internal machine coordinates and your CNC program. These three systems work together to precisely locate and machine parts with consistent quality time and time again. Whether you’re rocking a Bridgeport, Tormach, or Haas, the coordinate system always stays true.

Ready to dial in the coordinates for your next CNC project using integrated CAD/CAM software? Try Fusion 360 today!

Autodesk Fusion Logo

Elevate your design and manufacturing processes with Autodesk Fusion

Tags and Categories

CNC machine Machining

Get Fusion updates in your inbox

By clicking subscribe, I agree to receive the Fusion newsletter and acknowledge the Autodesk Privacy Statement.