G92 G-Code Explained: Temporary Axis Zeroing and Position Preset
The G92 command is used to preset the current machine position to a specific coordinate. It’s especially useful for setting temporary work offsets, zeroing tools, or managing custom coordinate frames — but it comes with important caveats.
In this guide, you’ll learn how G92 works, where it’s useful, and how to avoid common mistakes.
📐 What Does G92 Do?
G92 assigns new values to the current axis positions — without moving the machine.
Example:
G92 X0 Y0 Z0
Tells the controller:
“From now on, where you are is X0 Y0 Z0.”
🧭 Use Cases for G92
| Use Case | Why Use G92? |
|---|---|
| Temporary work offset | No physical fixture offset required |
| Resetting tool length manually | Manual tool change, no setter available |
| Sub-spindle or rotary setups | Adjust part orientation |
| G-code simulation & dry runs | Prevent full machine motion |
🔧 Example: Setting Z0 at Tool Tip
Let’s say you jog your tool to touch the top surface of a part and want that point to be Z0:
G92 Z0
From now on, wherever that position is — it will be interpreted as Z0.
🔁 G92 with Axes
You can use G92 on any combination of axes:
G92 X0 Y0 ; Set current location as X0 Y0
Or:
G92 X100 ; Set current location to X=100
This does not move the machine — it changes how the machine interprets your position.
🔓 Canceling G92: Use G92.1 or G92.2
Once set, G92 will remain active until it is:
- Manually canceled, or
- Machine is reset/rebooted
To cancel:
G92.1 ; Cancel active G92 offsets
G92.2 ; Reset offsets to zero
G92.3 restores the most recently set G92 offset.
⚠️ Warning: Persistent Offsets
On many machines (especially older FANUC-based), G92 stays in effect after M30 — and even through reset!
If you forget to cancel it, subsequent programs will behave unexpectedly.
📉 Risk Example
G92 X0 Y0
G00 X100 ; Machine will move relative to new G92 zero, not actual machine zero
If G92 is still active from a previous program, the X100 move might crash into a clamp or fixture.
✅ Best Practices
- Use
G92only when necessary (e.g., manual setups, rotary axes) - Always cancel G92 at end of program using
G92.1 - Avoid mixing G92 with
G54–G59unless you know what you’re doing - Simulate before running programs that use G92
🛠 Real-World Use: Manual Lathe Tool Zeroing
(Manually touch off Tool 1 on part face)
G92 Z0
...
G01 Z-10 F100
Allows manual reference without tool setter or probing.
📋 Summary
| Code | Function |
|---|---|
| G92 | Set new current position (temporary offset) |
| G92.1 | Cancel stored G92 offsets |
| G92.2 | Reset stored G92 to zero |
| G92.3 | Restore last saved G92 offset |
🎯 Final Thoughts
G92 is powerful but must be used with caution. When used properly, it’s great for manual setups, temporary zeroing, and simulation prep — but can also lead to major crashes if forgotten.
Always cancel G92 with G92.1 or G92.2 at the end of your program.
Leave a comment