Adding a Delay command

Hi All

I am trialing Lightburn and really like it.

However, when sending the initial command, m4 S0, then moving to origin, the command to turn laser on S30 for example, is followed by commands to start moving laser.

The problem is, the laser has moved about a 1/3 of an inch before the laser has had a chance to start burning. On a square box, starting in lower left corner, the box outline burns perfectly except the first 1/3 inch. With vcarve, then send with UGS, I could add a 1/2 second delay before moving for the laser to activate and vacuum to turn on with the post processor.

Is there a way with Lightburn to add a small delay prior to the head moving?

Thanks for any help

Please tell us more about your setup / type of laser. I see from your profile that you are running xcarve grbl 1.0c laser edition but you don’t provide laser type. Is this a CO2 or Diode laser setup?

Sorry, yes, it’s a 7w diode laser. La03 like this

I have been running it under vcarve and adding a g4 delay in vcarve post processor. I use m04 Sxx to control power, works perfect.

In LightBurn, After the initial hic of the power not running before the head moves, the rest of the cots are perfect.

I have used it to do photo work on ply which come out superb, so I know LightBurn is controlling the power, it’s just seems it needs a very tiny delay between turning laser on and moving head.

The next release adds the ability to dwell with a set power value at the start of cutting for GCode systems which could help. It is odd that this only happens the first time the laser is activated and not again.

1 Like

Thanks Oz, not sure either, but I really like the software. I will buy the current version and await the next version it’s dwell.

Many thanks

OK, a bit more investigation and I have found the cause. Sorry if this is a long post.

The setup is run with a relay to turn on vacuum and send 240v power to a 12v transformer to power laser.

M4 is sent first (PMW at zero)

When the M7 (spindle) command is sent, the laser is sent 12v, but under PMW Sxxx power control, so live, but zero laser output power.

When S229 (for90%) is sent it is preceded with a move command (G1Y62.41S229.5F1500)

the command sequence in the gcode file here runs through so quick that the command M7 is followed up by the G1Y62.41S229.5F1500 line and the relay introduces a very slight delay, so the command to move and instantly turn on laser is thwarted by the laser not being in a powered state for a bare fraction of a second.

By powering the laser ready bypassing the relay, the line G1Y62.41S229.5F1500 works instantly. I believe the sequence ‘relay on, send 240v to transformer, send 12v to laser’ is not instant enough.

My previous method of working with Vcarve had a second of delay at M7 added by G4 to allow the vacuum to kick in before powering my spindle. This also worked for the a delay for laser to get 12v power.

I can overcome this for now by manually switching the relay vacuum power on (which also feeds laser 12v power) in advance of sending the laser cut. This also explains why it only causes an error at the very first cut, the laser is in ready mode till the end of the cuts when m9 is sent.

One more quirk of Lightburn, with the laser stationed at origin, when the cut command is sent it goes to the right and up diagonally, returns to origin, then cuts the square.

Why does it add the lines at the start


I have listed the whole file here.

; LightBurn 0.8.07
; GRBL device profile, current position
G00 G17 G40 G21 G54
; Cut @ 1500 mm/min, 90% power
; return to starting pos
G0 X0Y0

Glad I have at least got to the root of this problem.


“The square?” Which square would that be? There’s a decent chance that there’s something funky in whatever file you’re trying to cut, or the settings used, so posting the file along with a screen shot of your “Start From” and “Job Origin” settings could help. My guess is that you’ve made an object that’s infinitely small at whatever that point is. LightBurn is creating GCode to go there, realizing there’s nothing to do, then coming back. Try a bandbox selection just inside the bounds of the square you’re referring to, and I bet you snag something.