Example program · 3D printing
E-steps Calibration Sequence (Marlin) — G-Code Example
Send these lines from a terminal (OctoPrint, Pronterface) to extrude exactly 100 mm slowly, then calculate the new value.
Send these lines from a terminal (OctoPrint, Pronterface) to extrude exactly 100 mm slowly, then calculate the new value.
| Item | Value |
|---|---|
| Machine | 3D printer (Marlin) |
| Units | Metric |
| Lines | 9 |
Program
M503 ; note the current M92 E value
M109 S210 ; heat the nozzle
M83 ; relative extrusion
; mark the filament 120 mm above the extruder
G1 E100 F100 ; extrude 100 mm slowly (about 1 minute)
; measure the distance left to the mark
; new E = old E × 100 ÷ (120 − distance left)
M92 E97.38 ; example result
M500 ; save▶ Check it in the 3D printer simulator
How it works
- F100 is slow on purpose: at high speed the result would show the melt limit, not the extruder.
- The E-steps calculator does the math and writes the M92 line.
Codes used in this program
- M503 — Report settings
- M109 — Set hotend temperature and wait
- M83 — Auto Air Jet On (Haas)
- M92 — Set steps per unit (E-steps)
- M500 — Save settings to EEPROM
Check bed size, temperatures, probe and macro names against your own printer before you use this code, and stay at the printer for the first run.
More 3D printing programs
- Marlin Start G-code with Mesh, Prime Line and Safe Heating
- Marlin End G-code: Retract, Park and Cool Down
- Klipper PRINT_START Macro with Adaptive Mesh and Purge
- Klipper PRINT_END Macro That Parks Safely at Any Height
- Klipper M600 Filament Change Macro
Was this page helpful?