3D printer G-code · Marlin

M119: Endstop states (Marlin)

Endstop states — Shows whether each endstop is "open" or "TRIGGERED". The first check when homing fails. Klipper: QUERY_ENDSTOPS.

By cnccode · Updated
On this page
  1. What does M119 do?
  2. Example
  3. Tips from practice
  4. Related commands
  5. More status commands
  6. Frequently asked questions
PropertyValue
CommandM119
FunctionEndstop states
FirmwareMarlin
GroupStatus
SyntaxM119

What does M119 do?

Shows whether each endstop is "open" or "TRIGGERED". The first check when homing fails. Klipper: QUERY_ENDSTOPS.

Example

G-code
M119

Tips from practice

  • Press the switch by hand and send M119 again: the state must change.

Marlin. Many Marlin commands only exist when the feature is enabled in the firmware build. If the printer answers "Unknown command", the feature is missing. Klipper does not understand most of these settings codes; it uses printer.cfg instead.

More status commands

CommandFunctionFirmware
M155Temperature auto reportMarlin
M105Report temperaturesMarlin and Klipper
M117Display messageMarlin and Klipper
M73Set print progressMarlin and Klipper
M114Report positionMarlin and Klipper
M300BeepMarlin

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 M119 do on a 3D printer?
M119 is endstop states. Shows whether each endstop is "open" or "TRIGGERED". The first check when homing fails. Klipper: QUERY_ENDSTOPS.
Does M119 work in Klipper and Marlin?
M119 is a Marlin command. Klipper uses its own commands and printer.cfg settings for this task.
Was this page helpful?