---
tag: m0209
title: Set Auto Retract
brief: Enable/disable auto-retraction.
author: thinkyhead

group: motion
requires: FWRETRACT
eeprom: true

codes: [ M209 ]
related: [ G10, G11, M207, M208 ]

notes:
- Requires `FWRETRACT`.
- Most slicers today can generate [`G10`](/docs/gcode/G010.html)/[`G11`](/docs/gcode/G011.html) but this option is useful for older G-code.
- Though not currently very popular, both volumetric extrusion and firmware-based retraction (and/or `M209`) make G-code more immune to changes from one machine to another, and permit changing the hardware without needing to re-slice.
- See related codes [`G10`](/docs/gcode/G010.html), [`G11`](/docs/gcode/G011.html), [`M207`](/docs/gcode/M207.html), and [`M208`](/docs/gcode/M208.html).

parameters:

- tag: S
  optional: false
  description: Set Auto-Retract on/off
  values:
  - type: bool

---

Enable or disable automatic retraction. This option is meant to help slicers that don't support [`G10`](/docs/gcode/G010.html)/[`G11`](/docs/gcode/G011.html). But it can be used to override retraction in any G-code.

When auto-retract is enabled, all reversed E-only moves are treated as retraction. (Recover moves are also automatically overridden.) When disabled, E retraction derives from G-code.
