What M303 means
Marlin cycles a selected hotend or bed around a target to calculate PID terms. E selects the heater, S the target, C the cycle count and U can apply the result. If EEPROM is used, M500 is a separate persistence step. Tuning must use realistic hardware and cooling conditions.
RepRapFirmware's M303 selects a heater with H or a tool with T and derives process-model parameters used for control and fault monitoring. Klipper instead documents PID_CALIBRATE followed by SAVE_CONFIG. Values from another printer or firmware are not portable.
Syntax and parameters
M303 [E<heater>] [S<temperature>] [C<cycles>] [U<bool>]M303 H<heater> S<temperature>E / H / TFirmware-specific heater selector: Marlin E, RepRapFirmware H or tool T. These forms are not interchangeable.
STarget tuning temperature in degrees Celsius.
CMarlin tuning cycle count; more cycles take longer.
U / P / A / Y / F / QFirmware-specific options for applying results, power, ambient temperature, hysteresis, fan power or quiet output.
Practical examples
Marlin hotend autotune
M303 E0 S210 C8 U1Tunes hotend E0 near 210 °C for eight cycles and asks Marlin to use the result; saving may still require M500.
RepRapFirmware heater tuning
M303 H1 P1 S240Tunes heater 1 at full PWM toward 240 °C; the returned model and persistence workflow are RRF-specific.
Firmware context
| System | Status | What changes |
|---|---|---|
| Marlin | Common | Common when PID temperature control is enabled; heater indices, available options and persistence depend on the build. |
| Klipper | Check dialect | Uses PID_CALIBRATE HEATER=<name> TARGET=<temperature>, then SAVE_CONFIG, rather than built-in M303. |
| RepRapFirmware | Common | M303 tunes a heater or tool and calculates process-model parameters; the test may overshoot and runs asynchronously. |
| CNC controllers | Not applicable | Not applicable to general CNC control; thermal systems require their own controller documentation. |
What this viewer can show
The viewer displays M303 in source but does not heat, cycle, time or validate a heater and does not apply resulting PID values. Its temperature statistics come only from supported print target commands.
Common mistakes
- Autotuning deliberately heats hardware and may overshoot the target.
- Tune the actual heater, sensor, fan and power configuration under suitable conditions.
- Applying or saving results is a separate, firmware-specific step.
Primary sources
This page is an original explanation, reviewed against the firmware documentation below. Always confirm commands against the firmware and configuration on the machine that will execute them.