Hi! I've been hugely enjoying using LaserWeb with an Elekslaser machine.

Hi! I’ve been hugely enjoying using LaserWeb with an Elekslaser machine. I’ve recently started trying to engrave onto some white surfaces, and for those I need to be able to turn the laser on and then wait maybe 200ms before the laser moves so that it reliably starts scorching.

Is that possible? Is there some gcode that I could insert into the ‘laser on’ code in LaserWeb that would make that happen?

It looked like adding ‘G4 P100’ after ‘M3’ would do it, but it seems to stop the print from working :frowning:

thanks!

It’s a Diode Laser. Turning it off completely often turns off the driver which has a startup delay. Modulation of the laser on the other hand has no delay, so the most convenient solution is to set the minimum laser value to 1.
This means the laser won’t turn off in segments where it should not scorch but it will be too weak to scorch.

This will work in raster mode, I am not sure if it currently works in vector mode too, in the past I had to manually search&replace in the g-code.

The G04 Dwell setting may only work in non-laser mode - not sure. The P value you specified would dwell for 100 seconds (as defined by the GRBL wiki). This would stop the laser for nearly a minute and a half. I think what you want here is G4 P0.100 for 100 milliseconds. Im not sure GRBL G04 supports X and U (milliseconds) dwell. Try 0.100 and see if it corrects your problem.

@Michael_Audette that’s perfect, thanks! It looks like some gcode examples for other firmwares (Marlin?) treat P as millisecs, so I got confused! ‘M3’ then ‘G4 P0.1’ works perfectly, however only in ‘$32=0’ non-laser mode (but that’s fine). In the laser mode it still delays, but turns the laser on after waiting!

That doesn’t surprise me. I know $32=1 disables “spindle” spin-up pauses. Glad I could help.

Did you try M4 instead of M3 in lasermode?
M4 does adjust the laser power depending on accelleration/decelleration and lasermode causes not to stop between two gcodes.

I never heard of a diode laser having a delay until the beam is established. That’s more of a problem on CO2 lasers, as diode lasers react much faster than CO2 tubes. For that problem we have the overscan feature. That combined with a min. power > 0 should fix the problem.

It doesn’t. As I said in my first comment, the driver has a startup delay. That’s why one should keep it powered on during the whole operation instead of waiting for it all the time.

That’s why I wrote to set the min. power > 0

Can you post a picture of your laser driver. I’d like to know what type that is.

@cprezzi I didn’t try M4, no - I’d assumed that with the PWM based on speed it might be worse when stationary - but I’ll give it a go and report back. There definitely doesn’t seem to be a delay in my laser driver (Elekslaser) - it’s kept powered all the time and it’s just the PWM pin that changes. My issue was very specific to white/blue materials that take a while to absorb the laser light until they discolour.

Ok. My laser driver gets modulation and power through the same two wire connection.

@ChPech That’s not a good idea. I suggest to change that and give the driver separate permanent power.

@Gordon_Williams For such materials I just set a lower feed rate.

@cprezzi I know. The driver has besides it’s power connector a separate TTL connector which means I could do this. But the bad thing is that the default state, if the TTL is disconnected, is 100% laser output power (5W).
From a safety perspective this is a bit too dangerous for my taste so I keep it as it is until I get a proper driver.

@ChPech I had this on mine too (when GRBL reset the laser would turn on for ~0.5 sec!) - but literally all I had to do was add a 10k resistor between the laser TTL line and ground, and problem solved! :slight_smile:

@Gordon_Williams Thanks, I will try that.