M104
created on
Saturday, 03 January 2026
by
Stefan Trucker
edited on
Friday, 16 January 2026
by
Stefan Trucker
Firmware
Klipper Marlin Repetier RepRap Firmware Prusa Firmware Prusa Buddy Firmware
M104 sets the temperature of the hot end without the printer waiting for the temperature to be reached.
Printing continues immediately while the hot end heats up or cools down.
This makes M104 ideal for situations where you don't want to pause printing.
Usage
- Preheating in the start G-code
- Temperature change during printing
- Setting the temperature of inactive hotends in multi-hotend setups
- Heating during movements such as homing and calibration
- Use M104 before M109 to save time
Code examples
M104 S [T] Code in Ablage kopierenSet hotend to 200 °C (without waiting)
M104 S200 Code in Ablage kopierenSwitch off hotend
M104 S0 Code in Ablage kopierenFor multi-extruder setups, heat tool 1 to 240 °C.
M104 S240 T1 Code in Ablage kopierenStart G-code example
M140 S60 ; Preheat bed
M104 S200 ; Preheat hotend, but do not wait
G28 ; Home
M109 S200 ; Now wait until hotend reaches 200 °C Code in Ablage kopieren
M104 S215
Important: Difference to M109
M104 → Set temperature without waiting
M109 → Set temperature with waiting
Therefore:
M104 = ‘Preheat’
M109 = ‘Wait until the temperature is right’
Both are almost always used together.
Important to know
- M104 does not block printing. / M104 does not cause waiting times.
- If the temperature is too low, the printer will continue to extrude anyway → risk of clogs / under-extrusion
Klipper
Internally mapped to SET_HEATER_TEMPERATURE.
vewandte Codes
M109
Hotend‑Temperatur setzen und WARTEN