Burning Between objects

Hello, I’m very new to Lightburn so please treat me gently, I hope this is the correct place to ask such a question!

I am using Lightburn on a home build machine which I intend to have Router, Plasma and Laser heads for eventually…Lightburn appears to have a fairly easy to follow UI so I am attempting to use it…initially just to generate GCODE if nothing else.

First up is PLASMA…and I have the problem that appears to be well documented here in that the ‘cutter’ function doesn’t turn off between objects…This simply requires Lightburn to recognise the jump to another object and turn the plasma/laser off before it moves (and back on again after the move). Lightburn is currently not creating NO GCODE to do this.

I have seen many references to:

and to type $32=1 into the console window as the ‘solution’, but this apparently turns on variable power…which obviously is not a function relevant to most Plasma cutters…and also doesn’t have the desired effect on the GCODE.

Is it possible to get Lightburn to add spindle on and off commands (M3 and M5 respectively) into the GCODE between objects? I have set up Custom GCODE for TOOL ON and TOOLOFF, but Lightburn does not add these between objects, only adding them at the start and end of the full sequence.

Finally, a number of the references here that I have read talk about typing $32=1 into the console window to turn on LASER mode. That’s rather cludgy, can’t this be done as an option in a settings window? In fact I have seen a reference to being able to do this in ‘Machine Settings’ yet I cannot find a Machine Settings option. Device Setting and General Lightburn Settings: Yes, but Machine Settings: No! Where is this menu please? Additionally, does the $32=1 command have to be typed in every time your turn the machine on or is it recorded for posterity?

Many thanks

1 Like

I would look at this thread.
GRBL Plasma cutter programing help - LightBurn Hardware Compatibility - LightBurn Software Forum

Thanks for the very quick reply and the link, I have only read it quickly, but there is obviously some useful stuff in it for me.

I’ll go read it in more detail but I don’t see any specific reference to how LB knows when to turn the ‘cutter’ on and off…as mentioned, in GCODE, it turns on at the start of the code and off at the end of it. To get it to turn off and on between objects, I have to manually edit the code which is a rather clumsy solution.

LB expects (for the purpose of gcode consumption by your CNC controller) your CNC controller to be in Laser mode, grbl configuration $32=1. In that mode, M4, M3, S, F, G1 and G0 gcode stmts/words have some altered behavior. See this link for laser mode description and the altered behavior. Grbl v1.1 Laser Mode · gnea/grbl Wiki · GitHub

1 Like

re. LB use of M4, M3, M5… experiment with the difference between LB device types of GRBL and GRBL-M3.

re. machine settings UI for things like $32=1… menu Edit->Machine settings

1 Like

How do you control power in the plasma machine?

My understanding is in laser mode, it’s turned off during a move… so it sounds like it’s being driven like a laser…

The settings for $30 are in the Edit → Machine Settings … along with your language translation.

$30 is the maximum speed of the spindle and $31 is the minimum speed of the spindle. If $31 isn’t zero, the spindle (plasma) won’t turn off completely. This could cause the issue you’re describing…

I don’t know how plasma machines are controlled, but this is generic for these hobby cnc controllers.

Might want to ensure $31 is zero.

This should only be needed when you change devices, between spindle and laser…

First visit to machine settings should include a save of the factory configuration… it’s easy to forget which variable and/or what value.

:smile_cat:

Hello, thanks for your quick responses too !

There isn’t 'Machine Settings option in the Edit tab…I have ‘Settings’ and ‘Device Settings’ but no ‘Machine Settings’. Hopefully my screenshot will be readable.

At present, I am only using LB to generate GCODE…there’s a lot of interfacing to do yet to turn the torch on/off and manage the torch height controller - basic hand shaking stuff…but I am not seeing any on/off commands in the CGODE it produces between objects…the consequence is that LB may well be expecting my controller to be in Laser mode but it probably doesn’t have a laser mode…I’m hoping that all the relevant control commands will appear in the GCODE (but currently aren’t). I don’t see how a fully equipped LB controlled machine will be able to interpret the code if there isn’t something that simply says ‘turn the cutter off before moving to the next object’. Am I missing something significant about LB here?

1 Like

ok, two threads of discussion going here, let’s do one at a time.

re. machine settings not in your Edit menu- table that for now, it could be due to the device profile you have selected, if any. Also, unless you are connected to a CNC controller, there aren’t any machine settings to review or change, but the option not being on the menu is a mystery right now.

re. no M5 gcode stmts prior to motion between objects - this link I gave you should explain it, its filled with config and runtime sequence of events conditions ? Grbl v1.1 Laser Mode · gnea/grbl Wiki · GitHub

Hi Jack,

You guys are amazing at speedy responses!

Power in the plasma m/c is controlled by a simple relay output and controlled by M3 (on) and M5 (off) commands in the GCODE…and there’s the problem…my code generated by LB doesn’t have off/on commands between objects…ie it carries on cutting when it shouldn’t…LB only puts tool on and tool off commands at the very beginning and end of the sequence.

Apart from the variable power capability that a laser has, I see very little difference between the two cutting technologies…on is on and off is off…surely?

As I mentioned above there is no Machine Settings tab in my edit menu…may be I don’t have sufficient machine set up for this to appear but, I don’t see that the machine or the mode it is in is relevant though is it? Just the plain GCODE should surely tell the cutter when to go on and off regardless of the machine it is talking to…how would any machine know when to go on and off unless the code tells it to!

1 Like

Hmm, the only apparently relevant detail I can find is in the last paragraph that says (my words) G0 movement commands automatically disable the laser for safety reasons. The GCODE generated by LB describes an object using G1 movement commands and then moves to a new object with a G0 command…the next object then being cut with G1 commands. My guess then is that LB is controlling the laser between objects by this ‘fail safe’ method rather than by an explicit off/on command…clever but arguably a bit naughty!

If that is true and I can’t reprogramme LB to do otherwise, then I don’t think I can use it. Pity…I quite like it otherwise (but good job I’m still running in the free trial period!)

I appreciate your help!

It’s late here now (I’m in the UK) so I’ll review this again tomorrow. I’m a bit puzzled though because I have seen references to other people using LB for plasma machines…

Don’t say this around the airport :crazy_face:

DC excited lasers can control power, this ensures corners and such were the machine must slow for a corner, it can maintain the correct energy levels to not burn the materials.

I guess it’s what you mean by on or off … not sure I follow…

Might have to renege on that…

The way this works with the $30 - $32 variables may interact with how the M commands function. Some of these won’t toggle the output is the spindle speed is zero. So it might be a quick test to just set $31 to 1 and see if it likes it…

Until someone jumps in with a better suggestion, I’d suggest the $31=1 option, quick and cheap.

Lightburn usually doesn’t put option in menus unless the device it’s controlling has that ability. I’d guess that’s the issue here. Might want to let us know what device type you picked when you created the device initially.

As far as I know Lightburn connects to your device as a terminal. It talks to your device rather asynchronously. Can you modify your configuration from the terminal?

Can you provide us a link to the type of controller you have?

My fiber doesn’t have machine settings either… :man_shrugging:

:smile_cat:

Sorry to step in.
You can select GRBL-M3 Flavor in the Custom GCode profile and then check the GCODE. ( it uses M3 M5) (M5 before moves)

Good one…and don’t mention Boeing either! (Shame, it was a great company)

‘Off’ means ‘no cutting’, ‘On’ means ‘cutting’.

Lightburn appears to make no specific on/off command between objects…it doesn’'t even turn the power up or down. It appears to not cut between objects by using the fact that a G0 command is seen as a dangerous command to use with a laser and so a G0 automatically disables the laser …and is cancelled by a following G1 command and the laser comes back on again. It’s a clever way of producing efficient code, but it stuffs me because my kit needs to see an explicit turn off/turn on command…if this control approach cannot be changed then I don’t think I can use LB unfortunately…pity as I like the UI very much.

Hello, thanks for the suggestion, but I am already using GBRL-M3…and it makes no difference. Here’s section of my GCODE (produced using GBRL-M3):

G1 X-0.297Y-0.076
G1 X-0.308Y-0.047
G1 X-0.317Y-0.016
G0 X43.916Y2.783
G1 X-0.016Y0.317
G1 X0.016Y0.317
G1 X0.047Y0.307
G1 X0.076Y0.297

The G0 command is the move between objects, the preceding G1s being the end of the previous shape (it’s a hole!) and the following G1s are the start of the next hole…and there are no M3/M5 commands here, despite me also adding them to the custom GCODE routines. It seems that LB doesn’t bother to turn the laser on/off between objects and just uses the default effect of G0/G1 commands.

Is there more to GBRL-M3 that I am missing perhaps?

It’s not LightBurn doing that, it’s the grbl firmware, which LB is following. But true, I’d say. Here is the description of the protocol grbl is following. At least that is what I suspect is the reason:

G0 axes

For rapid linear (straight line) motion, program G0 axes, where all the axis words are optional. The G0 is optional if the current motion mode is G0. This will produce coordinated linear motion to the destination point at the current traverse rate (or slower if the machine will not go that fast). It is expected that cutting will not take place when a G0 command is executing.

(The EMC2 G Code Language)

and (grbl firmware description)

In other words, a G0 rapid motion mode or G38.x probe cycle will never turn on and always disable the laser, but will still update the running modal state. When changed to a G1 G2 G3 modal state, Grbl will immediately enable the laser based on the current running state.

My controller is a standard type of board used with MACH3…and LB cannot find it. I haven’t got around to trying to complete the manual set up for it…but I’m not altogether worried by not having access to my machine settings as I don’t think this is the crux of the matter…the problem lies in the GCODE that LBis producing and whether my machine can interpret it correctly. As I am fairly confident my machine wouldn’t know to turn the ‘cutter’ off for a G0 command, I reckon I’m stuffed!

I don’t think so. You can also use “grbl” as type and activate “constant power” in layer settings. The gcode should not change compared to “grbl-m3”. The only difference is that you can’t disable constant power in grbl-m3.

Yes, thank you, I think you are correct…it’s the laser controller that is reacting to the G0/G1 commands. I don’t have a laser controller and so my machine isn’t reacting!

A quick-and-dirty solution could be to export the gcode to file each time and use search and replace to change

G0 ....

with

M5
G0 ...
M3

This regex seems to do it for me (tested in Notepad++):
Search for

^G0.*

replace with

M5\n$0\nM3

If you Define a Custom GCode profile with GRBL-M3 flavor Lightburn outputs M5 before G0.
The following example because I want dynamic(M4).