G10 G-code

Extruder of a 3D printer head

Description

G10 means “retract the filament from the hotend using the extruder.” This is the firmware-controlled alternative to using G1 commands to retract filament.

G10’s counterpart is G11, which means “unretract the filament from the hotend using the extruder.”

Configuration

You need to configure the retraction behavior in your extruder module’s configuration. The retraction parameters control how far and how fast the filament retracts:

V1 Retraction Settings:

  • : Distance to retract (mm)
  • : Speed during retraction (mm/sec)
  • : Extra length to push during recovery (mm)
  • : Speed during recovery (mm/sec)
  • : Height to lift Z during retraction (mm)
  • : Speed for Z lift (mm/min - note: different units!)

V2 Retraction Settings:

The retraction parameters in V2 are identical to V1:

  • : Distance to retract (mm)
  • : Speed during retraction (mm/sec)
  • : Extra length to push during recovery (mm)
  • : Speed during recovery (mm/sec)
  • : Height to lift Z during retraction (mm)
  • : Speed for Z lift (mm/min - note: different units!)

By default, most slicing programs will use G1 commands to retract filament manually, but using firmware-based G10 retraction is more efficient and allows your slicer to control retraction behavior more precisely.

When to Use G10

{::nomarkdown}G10{:/nomarkdown}-Based Retraction
Use firmware retraction ({::nomarkdown}G10{:/nomarkdown}) when:
- Your slicer supports it (RepRap, Prusaslicer, Cura, etc.) - You want consistent retraction behavior across prints - You need to tune retraction without re-slicing - You want cleaner, more organized G-code

Conflict with CNC Standard

G10 Command Conflict

G10 means "retract" for 3D printers, but it also means other things for CNC mills.

This conflict is because the Reprap project chose its Gcode without any consideration for the Gcode standard that had existed for decades, and this despite the fact that the real G10 could have been useful for 3D printers.

Smoothie supports both formats: if you use G10 without parameters it will do the 3D printer thing, and if you use it with parameters it will do the CNC mill thing.

See also: G-code standard on Wikipedia

Format

The command is used as such:

G10

Parameters

No parameters.

Further reading

These resources are used as references for Gcode:

This is a wiki! If you'd like to improve this page, you can edit it on GitHub.