---
tag: m0104
title: Set Hotend Temperature
brief: Set a new target hot end temperature.
author: thinkyhead

group: thermal

codes: [ M104 ]
related: [ M109 ]

notes:
- With `PRINTJOB_TIMER_AUTOSTART` this command will stop the print job timer if the temperature is set at or below half of `EXTRUDE_MINTEMP`.

parameters:

- tag: I
  since: 2.0.6
  optional: true
  description: Material preset index. Overrides `S`.
  values:
  - tag: index
    type: int

- tag: S
  optional: true
  description: 'Target temperature.<br/>With `AUTOTEMP` this also sets the min auto-temperature.'
  values:
  - tag: temp
    type: float

- tag: F
  optional: true
  requires: AUTOTEMP
  description: Autotemp factor. If omitted, uses `AUTOTEMP_FACTOR_P`.<br/>With `AUTOTEMP_PROPORTIONAL` enabled `F0` disables autotemp.
  values:
  - tag: factor
    type: float

- tag: B
  optional: true
  requires: AUTOTEMP
  description: Maximum auto-temperature
  values:
  - tag: temp
    type: float

- tag: T
  optional: true
  description: Hotend index. If omitted, the currently active hotend will be used.
  values:
  - tag: index
    type: int

examples:

- pre: Set target temperature for the active hotend
  code: M104 S185

- pre: Set target temperature for E1
  code: M104 T1 S205

- pre: '`AUTOTEMP`: Set autotemp range'
  code: M104 F S180 B190

- pre: '`AUTOTEMP`: Disable autotemp'
  code: M104

---

Set a new target hot end temperature and continue without waiting. The firmware will continue to try to reach and hold the temperature in the background.

Use [`M109`](/docs/gcode/M109.html) to wait for the hot end to reach the target temperature.
