Even though the direct usage of G-codes is often not necessary with the slicer software making it easier to issue commands to the printer, learning about G-codes is a fantastic way to expand your overall 3D printing knowledge.
In fact, most enthusiasts who end up feeling comfortable with G-codes start preferring to execute them directly in some cases rather than going through the slicer due to how easy and quick it is once you know what to do.
Today, we will discuss a G-code that we think should be in every 3D printing enthusiast’s toolkit as it performs one of the core actions required before starting each printing process.
So, what is the G92 E0 G-code?
G92 E0 is the combination of the G92 (set position) G-code for setting the positions of the extruder and the X, Y, and Z axes and the E0 parameter that refers to an extruder position of zero.
As a result, running the G92 E0 G-code sets the current extruder position to zero, essentially resetting it.
While not too complex of a G-code to understand, we will analyze G92 E0 in greater detail in the upcoming section, along with other examples and use cases for the G92 G-code that involves different parameters and values to cover everything there is to know about this command.
What Is the G92 E0 G-Code?
The G92 E0 G-code is actually the combination of a G-Code (G92) and a parameter that it accepts (E0).
The G92 (Set Position) G-code is responsible for setting the current positions of the extruder and the X, Y, and Z axes to the values you specify.
On the other hand, the E parameter’s purpose is to set the extruder position, with E0 referring to an extruder position of 0 (zero).
Combining the two, you get G92 E0, a command that tells the printer to set the current position of the extruder to 0, which we can also consider to be resetting (zeroing) it.
For the most part, you will see the G92 E0 G-code before an extrusion process starts and after it ends, as resetting the extruder position is necessary for the printer to be ready for the upcoming extrusion process.
What Is the G92 G-Code?
E0 isn’t the only parameter and value you can pass to the G92 G-code, meaning that it’s possible to use this command in different ways as well.
In a nutshell, the G92 G-Code allows you to specify the current positions of the extruder and the X, Y, and Z axes.
In the case of G92, “setting” does not mean physically moving the axes to the locations you specify but causing the printer to match the values you pass to its current position.
Since this can be pretty confusing to grasp at first, let’s go over an example to make things easier.
Imagine having the printhead resting at the position of X=20, Y=30, and Z=40, with the extruder having extruded 5 millimeters (or millimetric cubes in some firmware) of filament so far.
If you run the G-code G92 X0 Y0 Z0 E0 at this point, the printer will accept the printhead’s current position as X=0, Y=0, Z=0, and consider the extruder not to have extruded any filament so far.
While using G92 G-code with the XYZ values may not seem practical at first, it comes extremely handy in scenarios where you need to offset one or more axes.
What Is the E Value in G-Code?
The E value (like E0 in G92 E0) is a parameter you can find in many G-codes and isn’t specific to G92.
The E value refers to the total amount of material the printer has extruded after the execution of the command is over.
In most cases, the E value is denoted in millimeters, but it’s also possible for some firmware to use cubic millimeters instead.
Let’s look at an example to make things easier to understand:
G1 X3 Y5 E2
In this example:
- We are resetting the extruder position to 0.
- Performing a linear move to the X=3 Y=5 coordinate while extruding 2 millimeters (or cubic millimeters) of plastic.
Now, let’s imagine we add one more line to this example:
G1 X4 Y6 E3
With this line, we will be performing a linear move to X=4 Y=6, with only 1 millimeter of plastic extruded.
The reasoning behind the extrusion of only 1 millimeter of plastic and not 3 is due to the E value being relative, which is also why we reset the extruder position to 0 with E0 before each extrusion.
For everything extrusion-related, E values are necessary.
Can You Use the G92 E0 G-Code in Marlin Firmware?
As G-codes can sometimes vary between firmware, a common question is whether it’s possible to use the G92 E0 G-code in Marlin firmware or not.
G92 is one of the G-codes that have the same functionality across all popular 3D printing firmware, meaning that you can also use the G92 E0 G-code in Marlin firmware.
The G92 G-Code in the Marlin firmware follows the syntax below:
G92 X<position> Y<position> Z<position> E<position>
While the X, Y, and Z values refer to the X, Y, and Z axes, the E value is for the extruder position.
Since the syntax remains the same across all 3D printing firmware, you can use it with any firmware you like.
How to Use the G92 E0 G-Code in Cura?
Since using the G92 E0 G-code to reset the extruder before every print can get cumbersome, letting the slicer handle it can make things much more painless.
Here is how you can use the G92 E0 G-Code in Cura:
- Click Settings on the top menu of Cura.
- Position your mouse pointer over the Printer option, and click Manage Printers from the dropdown that appears.
- Choose your printer from the list on the left, and click the Machine Settings button.
- Add the G92 E0 G-code to the Start G-Code section, which you can find at the bottom-left corner of the dialog.
- Close the dialog.
While some printer profiles in Cura already have the G92 E0 code added in the Start G-code section by default, it’s a good idea to check and confirm nevertheless.
While running the G92 G-code with the E0 parameter is perhaps the most common way of executing this command, this is only a part of its functionality.
To quickly recap, G92 E0 is the combination of a G-code and a parameter.
The G92 G-code is responsible for setting the position of the extruder and the X, Y, Z axes, with the E parameter along with its value specifying the value of the extruder position.
In the case of G92 E0, you would be setting the current position of the extruder to the value 0.
Mike started his 3D printing journey with the Anet A8 when it first came out back in 2017, and has been obsessed with 3D printers ever since. Nowadays, he primarily uses his Ender 3 to print functional parts that make his life more convenient whenever possible.