G92: Set Position (Coordinate System Offset)
G92 tells the control "the tool is now at this position" and shifts the coordinate system to make it true. G92.1 clears the shift.
G92 doesn't move the machine. It tells the control: "the tool is now at this position". The control shifts the coordinate system so that the current position has the coordinates on the G92 line.
G92 X0 Y0 Z0
After this line, wherever the tool was is now X0 Y0 Z0. Every later move is measured from that point.
Only the axes on the line are changed. G92 Z0 sets the current Z to zero and leaves X and Y alone.
How G92 differs from work offsets
| Work offsets (G54 to G59) | G92 | |
|---|---|---|
| Measured from | Machine zero | Wherever the tool is when the line runs |
| Stored | In the offset table, where you can see and check it | As a hidden shift on top of the active work offset |
| Typical use | Production work on mills | Older programs, simple machines, and some 3D printers |
Work offsets are measured from a fixed point, so they come out the same every time. A G92 offset depends on where the tool was, so the same program can put the part in a different place if the tool isn't where you think when the line runs.
Why G92 catches people out
- It lingers. On some controls a G92 offset stays active after the program ends, and it can survive a reset or even a power cycle. The next program then runs in the wrong place.
- It stacks. G92 is applied on top of the active work offset, so a correct G54 can still give wrong positions.
- It's invisible. Many control screens show the work offset but not the G92 shift.
If you use G92, cancel it with G92.1 at the end of the program, and check the position display before starting the next job.
G92.1, G92.2 and G92.3
LinuxCNC supports all three. GRBL and Mach3 support G92.1.
- G92.1: cancel the G92 offset and reset it to zero.
- G92.2: suspend the offset without clearing it.
- G92.3: bring a suspended offset back.
G92 on 3D printers
On 3D printers, G92 E0 is very common. It resets the extruder position to zero, typically at the start of each layer, and doesn't affect X, Y or Z.
G92 on lathes
On lathes, G92 can mean something else entirely. On Fanuc-style lathes using the standard (A) G-code system, G92 is a threading cycle, and G50 sets the coordinate system and the maximum spindle speed. In the B and C systems, G92 takes over G50's role. Haas lathes use G92 as a threading cycle. Check the manual before moving a program between machines.
How CutViewer shows G92
CutViewer doesn't treat the axis words on a G92 line as a move, and it doesn't apply the G92 shift to later moves. Positions after G92 are drawn as written in the program. If a program relies on G92 to place the part, the drawing shows the shape correctly but not where it will end up on the machine.
Use work offsets (G54 to G59) where you can.
Frequently Asked Questions
What does G92 X0 Y0 Z0 do?
It doesn't move the machine. It tells the control that the current position is X0 Y0 Z0, and shifts the coordinate system so that is true. Every later position in the program is measured from there.
What is the difference between G92 and G54?
G54 to G59 are stored work offsets measured from machine zero. G92 is an extra shift applied on top of whichever work offset is active, based on wherever the tool happens to be when the line runs. Work offsets are easier to check and safer to use.
How do I cancel a G92 offset?
G92.1 cancels it on LinuxCNC, GRBL and Mach3. LinuxCNC and GRBL also have G92.2 to suspend the offset and G92.3 to bring it back. On Fanuc mills, G92 is usually replaced by work offsets altogether.
What does G92 mean on a lathe?
It depends on the G-code system. On Fanuc-style lathes using the standard (A) system, G92 is a threading cycle and G50 sets the coordinate system and maximum spindle speed. In the B and C systems, G92 does G50's job. Haas lathes use G92 as a threading cycle.
More G-Code Guides
Rapid positioning and straight cutting moves.
Clockwise and counter-clockwise arcs with I/J/K or R.
Pause for a set time, in seconds or milliseconds.
Choose the XY, XZ or YZ plane for arcs.
Inch or millimetre units for the program.
Return to home or a second reference position.
Cutter radius compensation, left, right and off.
Tool length offset on and off.
Work coordinate systems and machine coordinates.
Drilling canned cycles, from plain drilling to peck drilling.
Tapping cycle, and how to work out the feed rate.
Absolute positions or incremental distances.
Feed per minute, per revolution, or inverse time.
Constant surface speed or a fixed spindle RPM.
Where a drilling cycle retracts between holes.
Spindle, coolant, tool change, stop and subprogram codes.
Check your own program before you cut: open it in CutViewer to see the toolpath in 3D, the run time and any problems.
Open CutViewer