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.
Current position
The tool position at the end of the selected move. Vertical separation is enlarged for clarity.
Filament advance ΔE
0.00 mm
Requested speed
50 mm/s
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
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)
- G0/G1 linear moves and feedrate · Marlin
- G90 absolute positioning · Marlin
- M82 absolute extrusion · Marlin
- M104 hotend target · Marlin
- M109 temperature wait · Marlin
- Preview reference image: top and bottom shells · OrcaSlicer wiki
- disinterpreter — CC BY-SA 2.0 (reference photograph) · Wikimedia Commons
Figures such as temperatures and drying times are typical ranges. Always check the label on your own spool and your printer manufacturer's guidance.