Getting Lightburn to output GCode for GRBL-servo

Hello all,

I’ve seen a few threads on this topic, but couldn’t find a solution to my specific need. For context I am usually using Lightburn to control an Ortur Lasermaster 2 and that is how I got to know the software.

Unrelated to that, I’ve recently built two DIY pen plotters running on the custom GRBL branch “GRBL-servo”. I’ve gotten into the habit of generating Gcode for these using a modified version of the Inkscape 0.91 extenstion “Turnkey Laser” adapted to servo-based plotters. With this system Pen Up (no contact) and Pen Down (contact) are triggered by M3 S100 and M3 S0 respectively.

Contact (plotting) is triggered by 0 ; and positive values lift the pen up (no contact) by a certain distance through the arm of a servo. This makes sense, but this is the opposite of what a laser would do.

Now I’d love to use Lightburn to generate my Gcode for these plotters as it is way more robust than Inkscape (especially old Inkscape 0.91). Is there a way to override the laser values so that min (no plot) is 100, and max (plotting) is 0 ? This would allow me to make everything coexist nicely, and would allow me to rely even more on Lightburn - not only just for the Gcode generation, but perhaps even as a replacement for UGS for sending the jobs over to the plotter.

Thanks !

I don’t believe there’s any way you can achieve this today. It’s likely possible that you’ll be able to configure this in the upcoming generic gcode generator coming up in the next major release but not certain.

Well that does sound exciting ! I’ll be keeping an eye on that, and in the meantime I’ll keep experimenting with ways to make current Lightburn work for me - after all this is just a matter of doing some find and replace on two Gcode values.

And thanks for chiming in, that’s appreciated.

Global replace in any text editor…
[First] Laser On, Pen Down = S1000, Replace with M3 S0
[Second] Laser Off, Pen up = S0, replace with M3 S100

I wonder if the Cricut is like this…?

The cutting machine? That’s proprietary up and down the entire chain and they don’t want you snooping around either. It definitely doesn’t use g-code.

1 Like

Yeah until Generic GCode comes out for public use I’d recommend using Notepad++ and doing a Find and Replace All on the specific commands for Up/Down.

My daughter-in-law has one. I know nothing about it, except this now. Thanks!

You’d hate a lot about it. Locked down everything. Online only software with very limited capabilities. No ability to export vector graphics. Features available only if you subscribe. Super customer hostile especially when you consider how captive their customer base is.

She did not mention any of that. Surely somebody did an Instructable or video on how to hack one? Nope, just checked!

If I could get my hands on a broken one, I would try to convert it to a CNC GRBL controller. Anybody got one they want to donate?

There have been many software and hardware hacks in the past. Most of what you’ll find is using older hardware. Provo Craft’s (maker of Cricut) litigation has put a chill on a lot of this. Sure Cuts a Lot and Make the Cut are 3rd party design software which used to directly connect to many of the older models but does not for the newer models due to a legal agreement based on DMCA.

IIRC, the older ones used HPGL, the language HP used for their pen plotters, and were straightforward to run without the Cricut software.

They patched that hole in the newer cutters and darkened the skies with lawyers …

Hi all !

Indeed, I’ll run some tests using some simple find and replace. Lightburn is just too smooth and stable to pass on.


Regarding vinyl cutters : indeed, the first thing to do when researching them for a potential purchase is to thoroughly check the whole workflow chain. If the marketing appears to be wishy washy about custom designs that means that they don’t allow them, or lock their import behind some paywall and/or have a paid sub service for monthly custom designs. As a matter of fact there was some outrage and policy reversal on this topic not to long ago as Cricut started to limit file transfer to the machine (which of course requires to go through their online server - a good enough reason to not get anywhere near these machines).

Cricuts are being marketed heavily to beginner makers who “don’t know much about computers”, almost in a condescending kind of way. Whereas no-brand barebones cutters under 200USD can import vector files just fine without any artificial limitation or required subscription.

I personally use an old A4 Graphtec CraftRobo that I got used for next to nothing. From what I understand this was the precursor to the Silhouette line of small desktop cutters. The no-fuss software imports DXF natively and it works great. It’s basically a scaled-down version of the big office cutters of the same brand.

FWIW : vinyl cutters use a solenoid for the blade up/down action. The CraftRobo above is extremely easy to service to access all the internals, and IMHO it should be totally hackable for someone motivated enough. But the old software still works under win10 so there really is no reason to.

And as a follow-up to the original question, here is the content of a simple windows batch (.bat) file that converts any file dropped on it to something compatible with a servo driven by M3 Sx, by replacing the M3 and M5 commands by the desired values :

powershell -Command "(gc "%1") -replace 'M3', 'M3 S0' -replace 'M5', 'M3 S100'| Out-File -encoding ASCII UGS.nc"

It’s not quite perfect since ideally there would also be a pause right after pen down (because moving the pen immediatly after sending the pen drop instruction causes a skip at high speed) and I don’t think that Lightburn can generate that kind of pause after enabling the laser, but this is a good starting point nonetheless.

1 Like

This can be accomplished with G4 dwell time. For GRBL systems this is expressed as [G4 time_in_seconds].

Well yes, I am aware of that as that’s precisely what I rely on for my pen plots : a short pause before and after pen down.

G4 P0.15
M3 S0
G4 P0.25

That’s another reason why Lightburn can’t do quite what I need natively at this time. Or are you saying that this can be done with the Lightburn UI ? (I am having trouble understanding what you are getting at).

Sorry. I can see how the context was confusing. I didn’t mean to imply that LightBurn could generate the pause as it cannot currently. I was addressing more the portion where you’re saying “it’s not quite perfect”. I meant that you could add the pause into the swap script.

Understood ! Indeed, adding these pauses during the conversion would be ideal, and I am sure that with a bit more Powershell tinkering that should be perfectly doable :slight_smile:
For now I am content with my slightly convoluted setup, and I’ll be keeping an eye on this future LB update for custom GCode generation. Where can one read about it ?

I believe it will debut with 1.5.00 so will be announced with that.

If it helps at all - I have a powershell that I was working on today to convert Lightburn Marlin output files to a version of HPGL that my Vinyl Cutter can accept (so I can use Lightburn for everything). Maybe you could steal the code and customize - nothing fancy

That’s always interesting, thanks for sharing !