Testing Endstops/ Homing Sensors on LaserBoard

You are here:

If you are having an issue with homing failing, you may have an endstop related issue such as a broken switch or a poor wiring connection.

We can use the M119 GCode command in LightBurn to test whether the board is reading the endstop switches/ sensors in your machine.

First, turn off homing on connect in LightBurn device setup and finish through the rest of the setup wizard:


Select the Console tab in LightBurn’s main window, near Cuts and Move.

Type M119 into the Console command entry field exactly as it is written, with capital letter and no spaces. Press Enter to send the command.

You should see a response string that may look something like this:

X min:1 Y min:0 Z min:0

For each switch, a state of 0 means that the switch is not pressed, and a state of 1 means that the switch is pressed. So the example response above shows that the X switch IS pressed, and that the Y and Z switches are NOT pressed.

Complete the M119 test properly – this involves sending the command while the head is “in the middle” – not touching any switches, when it is pressing the X switch, and when it is pressing the Y switch.
The result, and feedback that we are looking for, is 3 clearly identified response strings.

  • “Here is the result of M119 when no switches are being depressed”
  • “Here is the result of M119 when the X switch is being depressed”
  • “Here is the result of M119 when the Y switch is being depressed”


If an endstop state does not change (always reads 0 or 1), you may have a bad switch or a wiring problem.

If an endstop reads as pressed when it is not, and as not pressed when it is, then your endstop logic is inverted. This can be corrected in the LaserBoard’s config.txt file.

To flip the X Min endstop logic, change:

alpha_min_endstop 1.28^


alpha_min_endstop 1.28^!

or the other way around, by adding or removing the ! at the end of the pin definition.

For reference, here is how each endstop will appear in the config file:

Config Value alpha_min alpha_max beta_min beta_max gamma_min gamma_max
Pin Name 1.24 1.25 1.26 1.27 1.28 1.29