What M104 / M109 means

M104 is useful when heating should overlap other preparation, such as homing or bed heating. M109 blocks later commands until the requested hotend condition is met, which makes it suitable immediately before priming or printing.

S is the common target-temperature parameter. On Marlin, M109 with R can wait while either heating or cooling, whereas S normally waits only while heating. Exact waiting tolerances, tool selection and material presets depend on firmware configuration, so start G-code should be written for the target printer rather than copied blindly.

Syntax and parameters

M104 S<temperature> [T<tool>]
M109 S<temperature> [T<tool>]
M109 R<temperature> [T<tool>]
S

Target hotend temperature in the active temperature unit; common firmware does not wait for cooling with S.

R

Target that waits while heating or cooling on firmware that implements this Marlin-style behavior.

T

Target tool or hotend where supported.

Practical examples

Heat while homing

M104 S200
G28

Starts heating, then continues to the homing command without waiting.

Wait before printing

M109 S200
G92 E0

Waits for the hotend, then resets the extrusion coordinate before priming.

Firmware context

SystemStatusWhat changes
MarlinCommonStandard set-and-wait hotend commands with build-dependent options.
KlipperCommonSupports common slicer forms; native TEMPERATURE_WAIT is available for more explicit macros.
RepRapFirmwareCheck dialectSupports common temperature commands, with tool and wait semantics documented by the firmware.
CNC controllersNot applicableThese additive-manufacturing M-codes are not generic spindle or coolant controls.

What this viewer can show

Recognized, not shown

The viewer recognizes nozzle-temperature commands, but it does not show temperature targets or add heating time to the print-time estimate.

Common mistakes

  • M104 does not guarantee the nozzle is ready before extrusion begins.
  • M109 can pause a print indefinitely when a heater cannot reach its target; firmware safety protections must remain enabled.
  • S/R cooling behavior and multi-tool selection are firmware-specific.

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.