G90 vs G91 Explained: Absolute and Incremental Positioning in CNC Programming
In CNC programming, G90 and G91 determine how the machine interprets all motion commands like G0, G1, G2, and G3.
- G90 = Absolute Positioning
- G91 = Incremental Positioning
Mastering the difference is essential for creating safe, accurate, and efficient toolpaths.
🔹 What Is G90 (Absolute Positioning)?
With G90, all coordinates are interpreted relative to a fixed origin, usually set by the work offset (G54, G55, etc.).
📘 Example:
G90
G0 X50 Y25
- The tool moves to coordinate X=50, Y=25 relative to work zero
- Always goes to the same place regardless of current position
✅ Use Cases:
- Safe rapid positioning
- Profile machining
- Most CAM programs default to G90
🔸 What Is G91 (Incremental Positioning)?
With G91, coordinates are interpreted relative to the current tool position.
📘 Example:
G91
G0 X10 Y-5
- Moves the tool 10mm in X+, 5mm in Y−, from current location
✅ Use Cases:
- Repeating patterns
- Looping moves (macros)
- Peck drilling
- Custom logic-based toolpaths
🔁 Side-by-Side Example
| Mode | Starting Position | Command | Resulting Position |
|---|---|---|---|
| G90 | (0, 0) | G1 X20 | X = 20 |
| G91 | (0, 0) | G1 X20 | X = 20 |
| G91 | (20, 0) | G1 X20 | X = 40 |
As you can see, G91 accumulates motion from wherever the tool currently is.
🧰 Full G90 Example
G90 G54
G0 X0 Y0
G1 Z-5 F100
G1 X50 Y0
G1 X50 Y50
G1 X0 Y50
G1 X0 Y0
G0 Z100
- Tool moves in a square path based on fixed positions
🧪 Full G91 Example
G91
G0 X0 Y0
G1 Z-5 F100
G1 X50
G1 Y50
G1 X-50
G1 Y-50
G0 Z100
- Creates same square as above, but via relative moves
🔀 Mixing G90 and G91
You can switch between them anytime:
G90
G0 X0 Y0
G91
G1 X10 Y10
G90
G1 X100 Y100
⚠️ Always be careful when switching modes — especially in loops or subprograms.
🛑 Safety Tip
Always specify G90 or G91 at the start of your program. Many controllers remember the last mode, even across runs.
O1002 (Safe Start Example)
G90 G54 G17 G21 G40 G49 G80
...
🔄 Common Mistakes to Avoid
| Mistake | Result |
|---|---|
| Forgetting G90/G91 declaration | Unexpected tool motion |
| Mixing modes mid-operation | Positioning errors |
| Looping in G90 | Repeats same move repeatedly |
| Using G91 in CAM without awareness | Offsets build up incorrectly |
✅ Best Practices
- Always declare positioning mode early
- Use G90 for:
- Part profiles
- Safe rapid moves
- Use G91 for:
- Repeating patterns
- Subprograms/macros
- Peck drilling and tapping
- Reset mode after custom loops to G90
🔚 Final Thoughts
The choice between G90 (absolute) and G91 (incremental) has a major impact on your toolpath strategy. Use them deliberately based on the operation type:
For consistent machining across all parts, use G90.
For intelligent motion control and advanced sequences, use G91 with caution.
By mastering both, you gain full control over how the machine interprets every move — a critical skill for every CNC professional.
Leave a comment