Limit switches with JtechPhotonics GRBL controller

I have the JtechPhotonics controller and laser system. The controller has connections for 3 limit switches. I would like to be able to “Home” the x and y axis at the start of all my engraving projects. Is this an option now? And if so, where could I find directions on implementing limit switches with Lightburn and JTechs’s controller?

Thanks for the help!

This is more of a hardware / GRBL configuration than a LightBurn one. LightBurn issues the $H command in GRBL when you click the home button, and the controller itself takes it from there. Read how to configure GRBL for homing here:

The various settings mentioned here can be accessed through the Edit -> Machine Settings menu in LightBurn, or just typed into the console.

Thanks for the info. I have installed limit switches. I don’t see anywhere that indicates whether to use NO or NC. Seems the controller needs one or the other. Or a means to indicate NO or NC is being used. I have tried both. I have enabled Homing in the machine settings. As well as $22=1 in the Lightburn console. The machine settings indicate that homing is enable.

When I click the home button, only the Z moves down. X or Y don’t move.

The console message is:
Alarm = 8
Grbl 1.1f
[Msg: ‘$H’|’$X’ to unlock]
[Msg: Caution:unlocked]

I have missed something somewhere. Any ideas on this?


Alarm 8 means a homing fail. It likely moved down, expected Z to hit a switch, and it didn’t, so it stopped. You may need to toggle the 3rd bit in $23 - Homing dir invert, mask. Bit 1 is X, bit 2 is Y, and bit 3 is Z (1, 2, 4 respectively).

I’m doing the $23 toggle steps.

Some homing progress! All axis are moving. Z is in the up direction and cycles OK. When the Y direction is OK, the X is wrong. I toggle X or Y, and then the opposite is true. Seems I can’t toggle only the X or Y. I use $23=1 to toggle X. It changes the direction of both X and Y. When I use $23=2, it also changes both X and Y directions. Am I doing some sequence wrong to toggle only one of the axis? Thanks!

The toggles are bits in a bit field, so they work like this:

X = 1 or 0
Y = 2 or 0
Z = 4 or 0

So if you want to reverse both X and Y, you’d use 1 + 2. If you want to reverse only Y and Z, you’d use 2 + 4.

OK. I finally got the directions heading the correct way. Thanks!

After a homing cycle, wouldn’t the “Get Position” be 0,0,0? Mine says -199, -199, -1

It would only be zero if your limit switches are at the same physical location as the origin. I don’t know the Acro system, where the origin is, or how much travel it has, so I can’t say if those numbers make any sense or not. They shouldn’t be negative - it sounds like you have a build of GRBL for a CNC, not a laser, as that would have “negative workspace” enabled.

Read more here:

My machine is like this: If your machine moves 10mm into the work area on both axis that’s good - it means your machine uses positive workspace coordinates. You simply set the origin in LightBurn to match the machine origin discovered above.

I assume the set origin is the button in Lightburn?

Now my question is: How can I only home the X and Y axis? When the Z axis is homed, it messes up the laser focus.

Thanks for all your help with this!!!

That’s referring to where you set the device origin in LightBurn when configuring your machine for the first time:
For homing only X&Y but not Z, you might need to compile a version of GRBL with Z homing disabled. From the GRBL settings page I linked above:

“By default, Grbl’s homing cycle moves the Z-axis positive first to clear the workspace and then moves both the X and Y-axes at the same time in the positive direction. To set up how your homing cycle behaves, there are more Grbl settings down the page describing what they do (and compile-time options as well.)”