3D printer G-code · Marlin and Klipper

M109: Set hotend temperature and wait (Marlin & Klipper)

Set hotend temperature and wait — Sets the hotend target and waits until it is reached. With S Marlin waits only when heating up; with R it also waits while cooling down.

By cnccode · Updated
On this page
  1. What does M109 do?
  2. Parameters
  3. Example
  4. Tips from practice
  5. Related commands
  6. More temperature commands
  7. Frequently asked questions
PropertyValue
CommandM109
FunctionSet hotend temperature and wait
FirmwareMarlin and Klipper
GroupTemperature
SyntaxM109 S<°C> or M109 R<°C>

What does M109 do?

Sets the hotend target and waits until it is reached. With S Marlin waits only when heating up; with R it also waits while cooling down.

Parameters

ParameterMeaning
STarget, waits only for heating
RTarget, waits for heating and cooling (Marlin)
TExtruder

Example

G-code
M109 S215 ; wait for 215 °C

Tips from practice

  • In Klipper TEMPERATURE_WAIT can wait for a range, which is faster than an exact value.
  • Waiting can take minutes on a large nozzle heater; the 3D printer simulator does not count this time.

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.

More temperature commands

CommandFunctionFirmware
M104Set hotend temperature (no wait)Marlin and Klipper
M140Set bed temperature (no wait)Marlin and Klipper
M190Set bed temperature and waitMarlin and Klipper
M141Set chamber temperatureMarlin
M303PID autotuneMarlin
M301Set hotend PID valuesMarlin
M304Set bed PID valuesMarlin
PID_CALIBRATEPID tuning (Klipper)Klipper
TEMPERATURE_WAITWait for a temperature rangeKlipper
SET_HEATER_TEMPERATURESet a heaterKlipper

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

Frequently asked questions

What does M109 do on a 3D printer?
M109 is set hotend temperature and wait. Sets the hotend target and waits until it is reached. With S Marlin waits only when heating up; with R it also waits while cooling down.
Does M109 work in Klipper and Marlin?
Yes, both firmwares understand M109.
Was this page helpful?