Plasma cutting cut through? Lightburn gcode output

Hi everyone, I’m using lightburn 9.24 with a grbl 1.1h plasma table. I’ve been able to cut out silhouettes with relative ease using lightburn. However, when it comes to slightly more substantial designs I have been having a harder time. while trying to figure out how to cut shapes from within another shape I keep failing partially because of not being able to dwell while beginning a cut, which isn’t an issue with a silhouette where I only have one outer cut to worry about and I can set the lead in to .5in which is long enough to pierce even without dwelling.

When I add a start pause time the machine pauses without enabling the plasma until after the pause(makes sense).

When I also enable cut through it still pauses without enabling the plasma(seems incorrect)

I have had constant power enabled this whole time so you know.

Also, I turned laser mode off because I read somewhere that it would allow for proper dwelling… it hasn’t appeared helpful yet and in fact, it may be the cause of the zig-zagging you’ll read about next probably because the machine believes it is spinning in between moves Idk.(perhaps ill enable laser mode tomorrow and try the same file tomorrow, doesnt fix the dwell though)

on my latest test, it appears as though the machine moved to the first cut fine (didn’t dwell correctly even with laser mode on with other cuts it hasn’t) but I let it go anyway just to see, and then it didn’t turn off the plasma till the end of the whole project lol so I ended up with lines zig-zagging throughout it.

Now I’m no gcode master (there is no but in there) and I’m wondering if this is correct to allow dwell time, this is straight from lightburn for a 1.5in square. not the test bracket with internal holes I was attempting but I assume it will work the same

I’m wondering why in the beginning it states “m4” then goes to “m3” but with an “S0” instead of S1000(if im not mistaken 0 means no power output while 1000 means full tilt) I truly don’t know

This is with 1000ms start pause time, cut through and constant power enabled

Before you check out the gcode im also wondering if m3 even works with grbl because I tried to use sheetcam then lightburn to send the code and sheetcam by default I guess only output m3 With no “S” code attached and the machine ghost cut(plasma no on) I’ve never tried start pause time or cut through on my co2 laser which is also a grbl 1.1h (homemade) but lightburn hasn’t let me down and I think defaults m4 at least on the code i exported to check

; LightBurn 0.9.24
; GRBL device profile, current position
; Bounds: X-2.97 Y-2.56 to X38.85 Y38.85
G00 G17 G40 G20 G54
G91
M4
; Cut @ 15 mm/sec, 100% power ------------------> Cut Settings
M8 ------------------>leaving air assist on like a dummy even though the plasma hands it
G0X-0.117Y-0.1009 -----> I think this is the move to the start position
M3 ------>??
M3 ------->??
G1 F100 S0 ---------->rapid move but no power
G4 P1 ---------> wait for it(suppose to be the dwell with power on)
G1 S0 -------> rapid with no power again
G0 ------> rapid with purposeful spindle off code I think
M4 -------> I think this is where it actually turns the plasma on now
; Layer C00
G1X0.096Y0.0801S1000F35.433
G1X-0.0033Y0.004
G1X-0.0027Y0.0046
G1X-0.0017Y0.005
G1X-0.0009Y0.0055
G1Y1.5036
G1X0.0009Y0.0054
G1X0.0018Y0.0051
G1X0.0026Y0.0045
G1X0.0034Y0.0041
G1X0.0041Y0.0033
G1X0.0046Y0.0026
G1X0.005Y0.0018
G1X0.0054Y0.0009
G1X1.5036
G1X0.0055Y-0.0009
G1X0.005Y-0.0018
G1X0.0046Y-0.0027
G1X0.004Y-0.0034
G1X0.0034Y-0.004
G1X0.0026Y-0.0046
G1X0.0018Y-0.005
G1X0.0008Y-0.0055
G1Y-1.5036
G1X-0.0008Y-0.0052
G1X-0.0017Y-0.0049
G1X-0.0025Y-0.0044
G1X-0.0031Y-0.004
G1X-0.0038Y-0.0034
G1X-0.0044Y-0.0026
G1X-0.0048Y-0.0019
G1X-0.0052Y-0.0011
G1X-0.0015
G1X-1.5036
G1X-0.0054Y0.0007
G1X-0.0051Y0.0018
G1X-0.0046Y0.0027
G1X-0.004Y0.0034
M9
G1S0
M5
; return to starting pos
G0 X0.021Y0.0208
M2

Any input would be appreciated

Thanks and sorry it was a long post
-Alex

Welcome to LB and plasma process. Congrats on your success plasma cutting with LB. I use it and love it. In my case I save the LB gcode and post process it to account for optional plasma specific process steps that involve 1) precisely setting torch pierce height (Z positioning) on per cut basis, and 2) use of an external (from grbl) torch height control while cutting. These are optional cut process steps, that is they are not necessary to be successful in LB use on plasma tables. These process options also need additional (relative to laser cnc but common to plasma tables) hardware and control wiring for each. Your problem intro does not indicate that you have or intend to use these process options, so let’s set this aside for now.

In your case, you’re already plasma cutting and that’s great. However, as you mention early in your problem description, you desire dwell or pause at the beginning of the cut to allow for pierce time. So lets address that, it’s pretty easy.

  1. I recommend you always use GRBL-M3 device profile for your plasma table process. This will cause spindle enable events to use M3 and M5 grbl commands which translate to plasma torch on / off commands respectively. This keeps the binary plasma torch control simple. Conversely, M4 is used in GRBL device profile and is strictly laser use case as it allows for variable power control while XY movements take place in G1 mode, and other other implied power control while flipping between G1 and G0 move modes; none of that is desirable for plasma use case and process.

  2. in order to get the dwell/pause when the plasma torch is ON (post M3), use “Cut Through” setting on pause time, else the pause is pre-M3.

Those 2 adjustments should do it for you. However, I will add that I don’t have plasma experience in using this dwell method since as I mentioned earlier, I save and post process the gcode to replace M3/M5 with my code blocks to set pierce height, dwell, initial cut height, and post cut retract; all on a per-cut basis. My only concern with the pure LB method described above, and the gcode follows here, is that the M5 M3 sequential commands after the pause may not behave well with your plasma cutter, but odds are it won’t be a problem. Here’s why - there are likely at least 2 mechanical electrical relays in the circuit to pick the plasma torch ON / OFF; one in or near your grbl control box and one in the plasma cutter. Mechanical relays need a few hundred milliseconds to respond, so barring any solid state relays or forced delays in the circuit, this code should work since the back to back M5 M3 commands will be only a couple ms apart, not enough time for the mechanical relay to respond to it.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; LightBurn 0.9.24
; GRBL-M3 (1.1e or earlier) device profile, current position
; Bounds: X-0.7 Y-0.7 to X292.79 Y127.7
G00 G17 G40 G21 G54
G91
; Cut @ 2250 mm/min, 40.6% power
M9
M5
G0X109.11Y34.53
M3 ( enable spindle, = plasma torch on )
G1 F100 S880 (set cut thru power, no effect on plasma process)
G4 P0.999 (pause or dwell)
G1 S0 (set power to 0, no effect on plasma process, plasma torch still on)
G0
M5 (disable spindle, = plasma torch off in theory)
; Layer C11
M3 (plasma torch on, again, in theory, but in all likelihood, mechanical relays will not be able to respond to such a quick toggle of state)
G1X0.4Y3.98S406F2250 (begin cut movements, and in this case, with a 4mm line lead in)
G1X-0.02Y0.11
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

If the above works, then eventually you’ll want to pay attention to cut direction and kerf offset to further fine tune your LB plasma process experience. LB has both. See the doc, but post if you have questions about it afterwards.

One more item, I run my plasma table cnc with $32=0, laser mode off. This will cause some grbl behavior changes when M4 is in play (which it’s not as described above), and when M3 is in play when combined with FeedHold and SafetyDoor interrupt input pins in the cnc controller. I recommend you run with laser mode OFF for plasma process, unless LB advises otherwise.

Cheers and good luck,
Lou

Hi, thanks for the response Lou. I had luck and got it working perfectly yesterday using similar methods. Using sheetcam I rewrote the post processor script to try m3(stock), M4, and m3 s1000 for the same cut file. I tried each of the gcode files through lightburn. I found that “m3” and “m4” wouldn’t even fire the plasma, but when “M3 S1000” was used it handled the plasma and dwell time perfectly. Knowing that maybe “M4 S1000” would also work. I read on a forum that grbl was changed at some point to require an “S” value, which may be why my machine isn’t dwelling properly with the way that lightburn compiles the cut through gcode. Also my machine doesn’t have a z axis so its made even more simple.

This is an example of the sheetcam gcode after my edits to the post processor that worked. To my slowly increasing knowledge of gcode it reads very easily, and keep in mind that m3/m4 alone didnt turn on the plasma with this same file:

G20
G0X2.75Y0.375
G0Z0.0
M3 S1000 ------> turn plasma on
G04 P1 ----->dwell
F35.4331 ----> set feed rate(I think)
G1X2.75Y0.25 ---->start moving
G1X0.25Y0.25
G1X0.25Y0.5
G1X2.75Y0.5
G1X2.75Y0.375
M5 --------------> turn plasma off
G0X2.4765Y1.5256

This is an example of lightburn correctly cutting out a bat symbol with the regular GRBL post processor, however, without the use of a dwell time it instead has a long enough lead in to pierce. I find it interesting that this it has no “S” value until the first “G1”, maybe because it states M4 then is followed by M3 so the machine thinks throughout the job it is an M3 then just uses the S1000 within the beginning of G1 moves to set the power??

; LightBurn 0.9.24
; GRBL device profile, current position
; Bounds: X-0.75 Y-13.38 to X153.15 Y51.55
G00 G17 G40 G20 G54
G91
M4
; Cut @ 15 mm/sec, 100% power
M8
G0X-0.0009Y-0.5267
M3
------> this is where the “G4 P1” for a dwell withought cut through enabled is placed
; Layer C00
G1X0.0009Y0.5S1000F35.433 ----> it would dwell without power till here cause of S value?
G1X1.0877Y-0.002
G1X0.4242Y-0.0005
G1X0.4241Y0.0009
G1X0.0453Y0.0007
G1X0.0043Y0.0003
G1X0.0043Y0.0008
G1X0.004Y0.0014

and with cut through enabled with reg grbl post it would have this:

; LightBurn 0.9.24
; GRBL device profile, current position
; Bounds: X-0.75 Y-13.38 to X153.15 Y51.55
G00 G17 G40 G20 G54
G91
M4
; Cut @ 15 mm/sec, 100% power
M8
G0X-0.0009Y-0.5267
M3
M3
G1 F100 S0 ------->I think this part of the post is incorrect as it sets no S value before the
G4 P1 dwell even though cut through is on
G1 S0 -
G0
M4
; Layer C00
G1X0.0009Y0.5S1000F35.433

I’ll have to test the GRBL-M3 post processor to see if it will work, this is some gcode using GRBL M3 cut through enabled

; LightBurn 0.9.24
; GRBL-M3 (1.1e or earlier) device profile, current position
; Bounds: X-0.75 Y-0.75 to X153.15 Y103.39
G00 G17 G40 G20 G54
G91
; Cut @ 15 mm/sec, 100% power
M9
M5
G0X2.186Y3.0955
M3
G1 F100 S1000 ------> it appears as though it would turn the plasma on
G4 P1 —>and dwell properly
G1 S0 —> i dont understand this one, moves without power??
G0
M5 ----> then shutting the plasma off before turning back on to do the cut?
; Layer C00
M3
G1X-0.0095Y-0.0131S1000F35.433
G1X-0.0115Y-0.0106
G1X-0.0131Y-0.008

This all being said I have it more figured out now for sure so maybe ill just have to edit all the gcode from lightburn, as i love the design elements from lightburn and Its probably the only software i’ll ever use for my co2 laser, and i can’t afford to pay for the full version of sheetcam currently.

Thank you so much for the info i’ll definitly give grbl m3 a go, cause if its easier then editing all that gcode im all in.

-Alex