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.

By cnccode · Updated
On this page
  1. Program
  2. How it works
  3. Codes used in this program
  4. More 3D printing programs

Send these lines from a terminal (OctoPrint, Pronterface) to extrude exactly 100 mm slowly, then calculate the new value.

ItemValue
Machine3D printer (Marlin)
UnitsMetric
Lines9

Program

G-code
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

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

Was this page helpful?