Is customizing laser commands possible when saving G-Code?


I’ve downloaded the trial for the LightBurn software to try out and while I like the interface thus far, I can’t find a way to make it work with my machine.

The machine is a Probotix GX3750 CNC running LinuxCNC that has the 2.8 watt laser kit by J Tech. (J Tech’s site led me to LightBurn.)

The machine will load the the exported G-Code and the the stepping motors begin moving the laser around, but the laser simply doesn’t fire off. Upon investigating it seems this is mostly due to the command differences.

According to the Wiki page on Probotix, there are these specific commands for the laser:

* E0 is the laser and is required to receive commands
* Q# is the power percentage to set (Q0 = OFF, Q100 = MAX power).
Suggested combined usage:    
M67 E0 Q50(turn on laser at 50% with next movement)
G01 X2 Y2 F15(laser turns on while moving into position)
M68 E0 Q0(turn off laser now)
G00 X3 Y3(move to next position)

The power scale is between 0 - 100, and gets addressed as E0.

Are there any settings within LightBurn that would allow me to specify what it needs to identify for the laser and power scale? Along with the Synchronized vs Immediate motions (M67 vs M68)?

Here’s an example of what LightBurn saved:

; LightBurn 0.9.02
; GRBL-M3 (1.1e or earlier) device profile, absolute coords
G00 G17 G40 G20 G54
; Image @ 201 in/min, 20% power

Then one from one of the post processor’s J Tech made:

G54 G17 G20 G40 G49 G90 G92.1 G64 P0.001
M68 E0 Q0 (Laser OFF)
G00 Z0.0010
G00 X0.0000 Y0.0000
G00 Z0.0010
G00 Z0.0010
G00 X2.4454 Y4.8967
G01 Z0.0000 F2362.2
M67 E0 Q100
G01 X2.4489 Y4.8953 
X2.4521 Y4.8953

I’d love to be able purchase a license for LightBurn if I can get this to work with my setup, especially with the features it offers. :grinning:

In short, no. LightBurn does not allow for customized gCode syntax or pre/post commands.

Popular controllers/ firmwares are all supported directly.

You might be able to post process the grbl gCode to what you want with a separate find replace script.

Does LinuxCNC mean that you were using Mach3 to control it? This is not a good way to run a laser. A recent thread explained it if you search for Mach3 here.

Hey Ray,

Thank you for getting back with me quickly.

So for the time being, it sounds like my options are limited unless I find a way to post process the g-code with a script as you suggest or hope that LightBurn may possibly support customized syntax/support for the system I have.

I may have to do a bit of research for a script or find a way to create one. I’ve dabbled in some PHP scripting so maybe I can utilize that. :thinking:

LinuxCNC was pre-installed and pre-configured with the Probotix machine, they package it with a computer for all of their machines.

To be honest this is my first adventure into the world of CNC, and I wanted to go for the J Tech laser kit they offered as well. Especially since I’ve got interests in etching acrylics.

So far with the software offering from Probotix and the post processor the fellow at J Tech offers for it, it seems to work well with LinuxCNC. I just was hoping for something a bit more powerful such as LightBurn to aid in my adventure here. :grin:

I wanted to provide an update with this, especially since I’ve been experimenting quite a lot with LightBurn, speed, laser power, and focus. Especially the latter two.

Here’s the result of using LightBurn with my Probotix GX3750 with the J Tech 2.8 watt laser kit running from LinuxCNC:

I’m still tweaking settings but this has been an excellent outcome in terms of speed, power, and focus.

The G-Code modifications worked nicely as well. I simply used the Marlin device profile within LightBurn to save the G-Code and used NotePad++ to find and replace for the laser commands.

Replace all M106 S0 with M68 E0 Q0. - For turning the laser off immediately.
Replace all M106 S with M67 E0 Q. - For turning the laser on with next movement.

Q replaces S for the power scale. Then of course a matter of replacing M106 with the appropriate commands while adding E0 for the laser to receive the commands.

I’ve also had to add M2 on the last line for “Program End”.

I’ve also made a suggestion in the suggestion box for requesting a device profile to support the Probotix with LinuxCNC, so saving G-Code would be easier. Hopefully whenever @LightBurn gets a chance to look into it. Though I hope the information and test results I’ve provided will help. Especially for others looking to use LightBurn for these machines.

Since I know everything works out, I plan to purchase the license since I can at least use a macro command in NotePad++ to make it a little quicker to modify the saved files.

For anyone curious I was using Poplar for my test here, I plan to tweak the settings further. :slight_smile:

Thanks to LightBurn for having excellent software, this is looking real promising! :sunglasses:


Did you buy the laser from Probotix with your cnc machine? I know they are offering them to new sales, but haven’t come out with a retrofit yet.
I bought a kit from JTech and Open Build with hopes of someday using the laser components on my existing cnc machine running Linuxcnc. Still haven’t figured out what all would be involved to do this. Would be interested in hearing more. Thanks

Yes. Upon ordering the machine I opted for the laser kit, and they installed it onto the machine.

If you go to Probotix’s Wiki page, you’ll see “configuring LinuxCNC” under reinstalling LinuxCNC. With the configuration files they provide, you might be able to find how they configured the laser that way. Possibly which Parallel port pins are used as well.

I don’t know the specifics myself, but I hope that is a good starting point for you. :slight_smile:

Thanks for the reply. Is there any additional components other than the laser itself that Probotix included for the laser to work? I am very familiar with their products. Could you post some pics of the laser mounted and any additional components? If you would rather, you can PM me.
I have looked into the Wiki site previously, but haven’t spent much time trying to decipher it yet. Lightburn seems to be a very good product!
Thanks again!