Send a "HOME" command with CLI

I have been successfully using the command line interface commands listed in the Launch LightBurn and Load Files into LightBurn using Command Line Interface forum post.

In addition to the commands listed there, I would like to be able to send a “HOME” command to Lightburn (and on to the laser machine) from the CLI.

Is the list of CLI commands in that forum post complete? Is there some other hidden way to send a “HOME” command through the command line?

For reference, I am using an OmTech K40+ laser with a GRBL controller.

Thank you.

Is it required to use LightBurn? Otherwise, it should be simple to write a script that opens the serial port, sends ‘$H’ as a command and then closes the port again.

Thanks for the quick response. It is desirable to use Lightburn, as I have another script built already that will generate a customized Lightburn (xml) file based on some input parameters and start the cut through the LightBurn CLI. So if I can find a solution there, I won’t have to break (and remake) the LightBurn serial port connection to the laser. To tell the truth, I don’t know much about scripting that kind of process. I imagine making the connection to the serial port is easy. I’m not so sure about what happens when I close it, and whether I can direct (via script) LightBurn to remake the connection.

But in the end, you are correct that ‘$H’ over serial will achieve the homing command I am after.

Another thing you could try is to add the homing command to the “start gcode” section of device settings. LightBurn then should add the homing in front of every job. I guess it should do as well when triggered via command line. But then it’s tied to each job and not a single command as you might want to have.

Great recommendation. I didn’t know that was possible - LightBurn newbie here.

I have a couple error handling issues to work out with the ‘$H’ at the beginning of the code, but I think I’m on my way to a solution.

The solution is completely different from what I thought I wanted, but it should work. I’ll mark this solved. Thank you @misken !

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.