What M18 / M84 means
A powered stepper holds position. Disabling it removes that holding torque, allowing an axis to be moved by hand or to drift under load. Marlin treats M18 and M84 as aliases: no parameters disables all configured axes, axis letters select particular motors, and S changes the idle timeout instead of immediately disabling them.
Releasing motors is not the same as moving to a safe position. On beds or gantries that can fall, disabling Z may lose the physical reference. A later file should normally home affected axes before trusting coordinates again, even if the controller still remembers the last commanded numbers.
Syntax and parameters
M18 [X] [Y] [Z] [E]M84 [S<seconds>] [X] [Y] [Z] [E]X / Y / Z / EImmediately disable only the named motors on supported firmware.
SSet the inactivity timeout in seconds on Marlin; S0 disables that timeout.
Practical examples
Release every stepper
M84Common end-G-code action after the machine has parked and heaters are off.
Set a one-minute timeout
M18 S60Changes Marlin's idle timeout instead of disabling motors immediately.
Firmware context
| System | Status | What changes |
|---|---|---|
| Marlin | Common | M18 and M84 are aliases with axis selection and S timeout support. |
| Klipper | Common | Supports M18/M84 to turn off motors; timeout behavior is configuration-driven. |
| RepRapFirmware | Common | Supports motor-idle controls with firmware-specific parameters and machine behavior. |
| CNC controllers | Check dialect | Motor enable control is machine-specific; do not assume printer M18/M84 semantics. |
What this viewer can show
The source command is preserved, but the viewer does not move axes or invalidate later coordinates automatically because real drift depends on machine mechanics.
Common mistakes
- Park the tool and make the machine safe before releasing motors.
- Disabling Z can let a heavy bed or gantry fall and lose its reference.
- Remembered coordinates are not proof of physical position after an axis has been moved by hand.
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.