What M112 means

Marlin describes M112 as a full shutdown and notes that a reset is required. Without its emergency parser, a serial M112 can wait behind queued commands. RepRapFirmware terminates moves and disables motors and heaters but can leave the power supply on. Klipper documents M112 as Emergency stop.

A software command depends on a powered, responsive controller and a communication path that delivers it. Firmware documentation therefore warns against treating it as a substitute for a hardwired emergency-stop circuit or a device that removes hazardous power.

Syntax and parameters

M112
No parameters

Requests the target firmware's emergency shutdown behavior.

Practical examples

Software shutdown request

M112 ; firmware emergency shutdown request

The comment states intent; actual response, latency and reset behavior come from the connected firmware and hardware.

Keep the safety boundary explicit

M112 ; software stop is not a power disconnect

The second comment documents that a software command is not evidence that hazardous power has been removed.

Firmware context

SystemStatusWhat changes
MarlinCommonStops the machine and requires reset; queue latency depends on the emergency parser and transport path.
KlipperCommonDocumented as Emergency stop and places the printer in a shutdown state.
RepRapFirmwareCommonTerminates moves and shuts down motors and heaters; the PSU may remain powered and reset or power-cycle is required.
CNC controllersCheck dialectEmergency-stop architecture is controller- and machine-specific; M112 is not a portable CNC safety command.

What this viewer can show

Not simulated

The viewer never executes M112. It continues parsing later file lines for inspection and does not claim that a printer would execute them, stop safely or remove power.

Common mistakes

  • Software E-stop is not a substitute for a safety-rated hardwired stop.
  • Serial buffering can affect how quickly a command reaches firmware.
  • A file containing M112 is not proof that the target printer or host will handle it as expected.

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.