What G0 / G1 means

A G0 or G1 block describes an endpoint, not an entire path sampled into points. The firmware plans a straight move from the current position to the requested X, Y and Z coordinates at the active feed rate. Coordinates that are omitted keep their previous value in absolute mode or contribute no change in relative mode.

Most slicers use G1 for both printing and travel. The command letter alone therefore does not tell you whether plastic is deposited: you also need the current extrusion mode and the change in E. G0 is commonly treated as a rapid travel alias by printer firmware, while CNC controllers may maintain a clearer distinction between rapid G0 motion and feed-controlled G1 motion.

Syntax and parameters

G0 [X<pos>] [Y<pos>] [Z<pos>] [E<pos>] [F<rate>]
G1 [X<pos>] [Y<pos>] [Z<pos>] [E<pos>] [F<rate>]
X / Y / Z

Target coordinates or relative distances on the motion axes.

E

Extruder position or extrusion distance, interpreted through M82/M83.

F

Feed rate. Printer G-code normally expresses it in millimeters per minute.

Practical examples

Travel without extrusion

G0 X80 Y40 Z0.4 F9000

Moves to X80 Y40 at Z0.4 without an E change, so a print viewer classifies it as travel.

Extrude a 40 mm line

M83
G1 X120 Y40 E1.6 F1800

With relative extrusion active, the move deposits 1.6 mm of filament while moving to X120 Y40.

Firmware context

SystemStatusWhat changes
MarlinCommonCore linear-motion commands; G0 and G1 may share the same motion settings.
KlipperCommonSupported as standard motion commands and frequently emitted by slicers.
RepRapFirmwareCommonSupported for coordinated linear motion and extrusion.
CNC controllersCheck dialectG0 is rapid positioning and G1 is feed motion; machine limits and modal feed modes matter.

What this viewer can show

Visualized

The viewer draws G0/G1 motion, distinguishes positive extrusion from travel, and uses the moves for bounds, speed and time estimates.

Common mistakes

  • F is modal: it remains active until another block changes it.
  • G90/G91 changes how X, Y and Z are read; M82/M83 separately controls E.
  • A positive E value is not automatically positive extrusion when absolute extrusion is active; the change from the previous E position is what matters.

Primary sources

This page is an original explanation, reviewed against the firmware documentation below. Always confirm commands against the firmware and configuration on the machine that will execute them.