Back to roadmap
Software: slicersBeginner16 min

Reading G-code and previews

Step through a small toolpath, distinguish travel from extrusion and decode coordinates and feedrate.

From observation to a working decision

G-code is a sequence of commands, not a picture of a finished part. The meaning of a coordinate depends on the active modes and earlier commands. Read the setup before interpreting a move.

Try the experiment

Step through a fixed, non-executable example. It starts in millimetres, absolute XYZ and absolute E, with E reset to zero. The first position is an assumed starting point.

Your task

Select the final move. Identify it as travel and convert its feedrate from mm/min to mm/s.

Simplified teaching model. Dimensions and colours highlight the idea; they are not a printer calibration or measured prediction. Orbit changes your view, not the print orientation.

Inspect a numbered part

Current position

The tool position at the end of the selected move. Vertical separation is enlarged for clarity.

G21
G90
M82
G92 E0
G1 X0 Y0 Z0.2 E0 F3000
G1 X20 Y0 Z0.2 E0.75 F1200
G1 X20 Y20 Z0.2 E1.5 F1200
G1 X0 Y20 Z0.2 E2.25 F1200
G1 X0 Y0 Z0.2 E3 F1200
G1 X10 Y10 Z0.4 E3 F3000

Filament advance ΔE

0.00 mm

Requested speed

50 mm/s

Classify the selected move

Keep experimenting: the target is not met yet.

Position and extrusion modes

G21 selects millimetres. G90 selects absolute XYZ positions and G91 relative moves. M82 selects absolute E and M83 relative E. G92 E0 resets the extrusion coordinate. Mode interactions vary by firmware, so this example sets M82 explicitly after G90.

Read the change, not just the number

With absolute E, subtract the previous E value to find the filament advance. A positive E number can still mean no extrusion if it did not change. F is feedrate in mm/min in this example: divide by 60 for mm/s. Feedrate is requested speed, not a guarantee under acceleration limits.

Preview before printing

Use the slicer layer slider and feature/speed colours to check missing islands, unsupported paths, wall continuity and travel. M104 sets a hotend target; M109 waits for the requested condition. Start/end commands, homing and temperature rules are printer-specific. Do not print this teaching snippet.

Recognize it in the workshop

A real slicer preview separates path features by colour. Use its layer slider to inspect the sequence, then compare with the teaching toolpath above.
A direct drive extruder: the motor and gears sit on the print head, right above the hotend.disinterpreter · CC BY-SA 2.0 · Wikimedia Commons

Terms to keep

Feedrate
Requested movement rate, here in mm/min.
Travel
Movement without depositing a printed bead.
Absolute coordinates
Positions measured from the active coordinate origin.

Use it on your next print

Open a sliced model in Preview. Pause at a layer with a hole or support and trace one perimeter and one travel. Confirm the intended printer profile before exporting.

Check yourself

Pick an answer for each question.

1. F1200 in this millimetre example is…

2. Absolute E stays at 3 during an XYZ move. What is deposited?

3. What must you read before interpreting X20?

Sources (7)