C3D MiniIn The NewsK40 Lasers

Testing K40 Endstops With LightBurn

Sometimes endstops can cause some hard-to-find issues. If you have a Cohesion3D or other Smoothie based controller you can troubleshoot your endstops from within the LightBurn console.

There are a few prerequisites for this to work. Your controller must be G-code based and be supported by LightBurn, LightBurn must be able to communicate with the controller, and you must manually actuate and deactuate the endstops.

There is a command that allows you to debug this kind of situation : the “M119” G-code. When M119 is entered in to the console the controller will answer with the status of each endstop that will look something like this :

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

The above output means that the X endstop IS pressed and the Y and Z endstops are NOT pressed.

Now let’s apply this to your situation and test your endstops:

  1. Make sure the machine is safe to mess around in and turn off the laser power off so the laser cant fire
  2. Open LightBurn and click the Devices button in the Laser panel  the double-click your device
  3. Click Next on “pick your laser”, click Next again on “how to connect”, and click Next once more
  4. Make sure origin is set to FRONT LEFT and that “Auto Home On Startup” is toggled OFF
  5. Click Next, click Finish, and finally click Okay.
  6. Click on the Console tab,  enter M119 in the text box (under the Macro buttons) and hit Enter on the keyboard
  7. See how the console responds. It should look like the above example
  8. Now manually actuate the X endstop (press it if manual or use folded paper to interrupt if optical)
  9. Issue the M119 command again and look at the results. They should be X=1, Y=0, and Z=0 (like above)
  10. UNactuate the endstop and reissue M119. The results should be X=0, Y=0, and Z=0
  11. If the results show a failure then make a note of each condition and move on to the Y and Z axes the same way

If an end-stop is reading as always pressed, or never pressed, even when you press or release it, then you probably have a wiring problem, check everything.

If an endstop is read as pressed when it is not, and not pressed when it is, then your end-stop is inverted.

You can fix that situation by inverting the digital input pin in your configuration file. For example if your X min endstop pin is inverted, change :

alpha_min_endstop                            1.28^

To :

alpha_min_endstop                            1.28^!

Here is the exact mapping of pin names to inputs on the board :

Endstop X MIN X MAX Y MIN Y MAX Z MIN Z MAX
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

Here are more resources for endstops:

Related Articles