Imagine giving someone directions. You can either say, "Go to the exact address of 123 Main Street," or you can say, "Walk exactly three blocks north from where you are standing." CNC machines use these exact same concepts. They are controlled by two modal G-codes: G90 (Absolute) and G91 (Incremental).

1. The Core Concept

G90: Absolute Positioning

In G90 mode, every coordinate you command is relative to a single, fixed point: Part Zero (G54). It doesn't matter where the tool currently is; it will move to the exact coordinates specified on the grid.

G91: Incremental Positioning

In G91 mode, coordinates are distances measured from the tool's current position. The machine forgets about Part Zero and only cares about taking "steps" relative to where it is right now.

2. A Tale of Two Squares

To understand the difference, let's look at how you would program a simple 2" x 2"50mm x 50mm square using both methods. Assume the tool is starting at the bottom-left corner of the part (X0, Y0).

Method A: Using G90 (Absolute)
G90 G01 X0.0 Y0.0 F20.0 (Start at origin)
Y2.0Y50.0 (Move up to Y=2.0)
X2.0X50.0 (Move right to X=2.0, Y stays at 2.0)
Y0.0 (Move down to Y=0.0, X stays at 2.0)
X0.0 (Move left back to origin)
Method B: Using G91 (Incremental)
G90 G01 X0.0 Y0.0 F20.0 (Start at origin in absolute)
G91 (Switch to incremental mode)
Y2.0Y50.0 (Move 2.0 units UP from current spot)
X2.0X50.0 (Move 2.0 units RIGHT from current spot)
Y-2.0Y-50.0 (Move 2.0 units DOWN from current spot)
X-2.0X-50.0 (Move 2.0 units LEFT from current spot)

3. Why use G91? The Power of Subprograms

Looking at the example above, G90 seems much easier to read and troubleshoot. So why does G91 exist? Repetition.

If you have to machine the exact same pocket shape 10 different times on a large plate, programming 10 absolute pockets takes hundreds of lines of code. With G91, you write the pocket shape once in a subprogram. You use G90 to drive the tool to the center of pocket #1, call the G91 subprogram, then drive to pocket #2, and call it again. Because G91 only cares about distance, the pocket geometry cuts perfectly no matter where it starts!

4. The G28 Safety Trick (Crucial)

One of the most important uses of G91 is sending the machine to its home position safely using G28 (Return to Reference Point).

The G90 vs G91 Z-Retract Trap

When you want to send the Z-axis straight up for a tool change, you use G28. But watch what happens depending on your positioning mode:

  • BAD: G90 G28 Z0.0
    This tells the machine: "First, go to Absolute Z0.0 (the top of the part!), THEN go to machine home." Result: Crash.
  • GOOD: G91 G28 Z0.0
    This tells the machine: "Move exactly 0.0 inches from your current position, THEN go to machine home." Result: The spindle retracts straight up instantly.
The Modern Alternative: G53

While the G91 G28 trick is an industry classic, many modern programmers prefer to use G00 G53 Z0.0 to retract the spindle safely.

G53 forces the machine to move based on its Absolute Machine Coordinates, completely ignoring your G54 part zero. It is often considered the safest method because you do not have to switch into Incremental (G91) mode at all, completely eliminating the risk of forgetting to switch back to G90!

The Modal Forgetting Curve

G90 and G91 are modal. If you switch to G91 to do a quick incremental move, and you forget to put a G90 on the very next line, the machine will interpret all your following absolute coordinates as massive incremental jumps. Always return to G90 immediately after an incremental operation.

Test Your Coordinates

Want to see the chaos of forgetting to switch back to G90? Copy the "Method B" code above into our G-Code Viewer, and try removing the negative signs from the last two lines to see how the tool walks away from the origin!

Open G-Code Viewer

Conclusion

Modern CAM software outputs 99% of its code in G90 (Absolute) because it is inherently safer and easier to track. However, knowing how G91 (Incremental) works is essential for hand-coding subprograms, understanding machine home sequences, and troubleshooting programs at the controller.