Definition

Proportional, integral and derivative control reacts to present error, accumulated error and rate of change. Autotuning deliberately cycles or excites the real heater so firmware can derive suitable values or a process model. The result depends on heater power, sensor placement, fan airflow, thermal mass, voltage and ambient conditions.

Marlin uses M303 for PID autotune, Klipper uses PID_CALIBRATE, and RepRapFirmware's M303 derives model parameters used to calculate control values. The command, selector, output and save mechanism differ, so constants should not be copied blindly between machines.

What matters in practice

Tune the real system

Sensor, heater, sock, fan, bed surface and power supply all affect the measured response.

Expect temperature movement

Autotuning heats and may overshoot; follow the firmware's preparation and supervision guidance.

Save deliberately

Applying a result and persisting it across restart are separate firmware-specific actions.

Example in G-code

Three dialect-specific workflows

; Marlin
M303 E0 S210 C8
; Klipper
PID_CALIBRATE HEATER=extruder TARGET=210
; RepRapFirmware
M303 T0 S210

The commands express a similar goal but are not interchangeable syntax and do not necessarily produce the same form of parameters.

What this viewer can show

In this viewer

The viewer shows tuning commands as source text only. It does not run a thermal model, judge returned constants, or infer a safe target from a material name or previous metadata.

Primary sources

This explanation uses firmware documentation and details visible in G-code. Your printer's settings still determine what the machine does.