Marlin G and M codes

⌘K
  1. Home
  2. Docs
  3. Marlin G and M codes
  4. G Codes

G Codes

1.0.0-beta motion

G0-G1 – Linear Move

Add a straight line movement to the planner

G2-G3 – Arc or Circle Move

Add an arc or circle movement to the planner

G4 – Dwell

Pause the planner

 1.1.0 motion

G5 – Bézier cubic spline

Cubic B-spline with XYZE destination and IJPQ offsets

 motionDIRECT_STEPPING

G6 – Direct Stepper Move

Perform a direct, uninterpolated, and non-kinematic synchronized move

 1.0.0-beta motionFWRETRACT

G10 – Retract

Retract the filament

G11 – Recover

Recover the filament with firmware-based retract.

 1.1.0 nozzleNOZZLE_CLEAN_FEATURE

G12 – Clean the Nozzle

Perform the nozzle cleaning procedure.

 geometryCNC_WORKSPACE_PLANES

G17-G19 – CNC Workspace Planes

Select CNC workspace plane

 1.1.0 unitsINCH_MODE_SUPPORT

G20 – Inch Units

Set Units to Inches.

G21 – Millimeter Units

Set Units to Millimeters.

 1.1.0 calibrationHAS_MESHG26_MESH_VALIDATION

G26 – Mesh Validation Pattern

Test the mesh and adjust.

 1.1.0 nozzleNOZZLE_PARK_FEATURE

G27 – Park toolhead

Park the current toolhead

 calibration

G28 – Auto Home

Auto home one or more axes.

 calibrationAUTO_BED_LEVELING_3POINT

G29 – Bed Leveling (3-Point)

Probe the bed and enable leveling compensation.

 calibrationAUTO_BED_LEVELING_BILINEAR

G29 – Bed Leveling (Bilinear)

Probe the bed and enable leveling compensation.

 calibrationAUTO_BED_LEVELING_LINEAR

G29 – Bed Leveling (Linear)

Probe the bed and enable leveling compensation.

 calibrationMESH_BED_LEVELING

G29 – Bed Leveling (Manual)

Measure Z heights in a grid, enable leveling compensation

 calibrationAUTO_BED_LEVELING_UBL

G29 – Bed Leveling (Unified)

Probe the bed and enable leveling compensation.

 calibrationAUTO_BED_LEVELING_(3POINT|LINEAR|BILINEAR|UBL)|MESH_BED_LEVELING

G29 – Bed Leveling

Probe the bed and enable leveling compensation

 1.0.0-beta calibrationHAS_BED_PROBE

G30 – Single Z-Probe

Probe bed at current XY location

 1.0.0-beta calibrationZ_PROBE_SLED

G31 – Dock Sled

Dock the Z probe sled.

G32 – Undock Sled

Undock the Z probe sled.

 1.1.0 calibrationdeltaDELTA_AUTO_CALIBRATION

G33 – Delta Auto Calibration

Calibrate various Delta parameters

 calibrationZ_STEPPER_AUTO_ALIGN

G34 – Z Steppers Auto-Alignment

Align multiple Z steppers using a bed probe

 calibrationASSISTED_TRAMMING

G35 – Tramming Assistant

Run a procedure to tram the bed

 1.1.0 calibrationG38_PROBE_TARGET

G38.2-G38.5 – Probe target

Probe towards (or away from) a workpiece

 1.1.2 calibrationHAS_MESH

G42 – Move to mesh coordinate

Move to a specific point in the leveling mesh

 geometryCNC_COORDINATE_SYSTEMS

G53 – Move in Machine Coordinates

Apply native workspace to the current move.

G54-G59.3 – Workspace Coordinate System

Select a workspace coordinate system

 coordinates

G60 – Save Current Position

Save current position to specified slot

G61 – Return to Saved Position

Return to saved position of specified slot

 calibrationPROBE_TEMP_COMPENSATION

G76 – Probe temperature calibration

Calibrate probe temperature compensation

 motionGCODE_MOTION_MODES

G80 – Cancel Current Motion Mode

Cancel the current motion mode

 1.0.0-beta units

G90 – Absolute Positioning

Set the interpreter to absolute positions

G91 – Relative Positioning

Set the interpreter to relative positions

 1.0.0-beta motion

G92 – Set Position

Set the current position of one or more axes.

 calibrationCALIBRATION_GCODE

G425 – Backlash Calibration

Use a conductive object to calibrate XYZ backlash

 debugDEBUG_GCODE_PARSER

G800-M800 – Debug Gcode Parser

Returns Gcode data