3D printer G-code · Marlin and Klipper
M104: Set hotend temperature (no wait) (Marlin & Klipper)
Set hotend temperature (no wait) — Sets the target temperature of the hotend and continues at once. Used to start heating the nozzle while the bed heats, or to change the temperature between layers. S0…
On this page
| Property | Value |
|---|---|
| Command | M104 |
| Function | Set hotend temperature (no wait) |
| Firmware | Marlin and Klipper |
| Group | Temperature |
| Syntax | M104 S<°C> [T<tool>] |
What does M104 do?
Sets the target temperature of the hotend and continues at once. Used to start heating the nozzle while the bed heats, or to change the temperature between layers. S0 turns the heater off.
Parameters
| Parameter | Meaning |
|---|---|
S | Target temperature in °C |
T | Extruder number on multi-extruder printers |
Example
M140 S60 ; bed, no wait
M104 S150 ; nozzle to 150 for probing, no ooze
M190 S60 ; wait for bed
M109 S210 ; wait for nozzleTips from practice
- M104 alone never waits: a print can start with a cold nozzle if no M109 follows.
- Heating the nozzle only to 150 °C during bed heating and probing stops oozing.
The command works in Marlin and Klipper. Options can differ: Klipper accepts fewer parameters for some M-codes and ignores codes it does not know with an "Unknown command" error.
Related commands
- M109 — Set hotend temperature and wait
- M140 — Set bed temperature (no wait)
- M190 — Set bed temperature and wait
More temperature commands
| Command | Function | Firmware |
|---|---|---|
M109 | Set hotend temperature and wait | Marlin and Klipper |
M140 | Set bed temperature (no wait) | Marlin and Klipper |
M190 | Set bed temperature and wait | Marlin and Klipper |
M141 | Set chamber temperature | Marlin |
M303 | PID autotune | Marlin |
M301 | Set hotend PID values | Marlin |
M304 | Set bed PID values | Marlin |
PID_CALIBRATE | PID tuning (Klipper) | Klipper |
TEMPERATURE_WAIT | Wait for a temperature range | Klipper |
SET_HEATER_TEMPERATURE | Set a heater | Klipper |
Test it before you print
Paste your start code or a whole file into the 3D printer simulator. It plans every move, shows the time and finds missing waits, cold extrusion and moves outside the bed.
Open the simulator