While I was searching for how to generate gcode what the UCCNC can digest, I found this topic " Stepcraft 840V2 and UCCNC controller UC100 " what helped me a lot.
I would still have 3 problems.
1, after M3, I need an M10 Q255 command to switch the laser on. I made a replace all while post processed the gcode, from M3 to M10 Q50 and it worked. M5 switched off. The best would be, if I would have M3 only at the beginning and M10 Qxx would switch it on, M11 would switch off.
2, at the “header”, started with “;” there is a line : “; GRBL-M3 M10 Q50 (1.1e or earlier) device profile, absolute coords”. Unfortunately UCCNC does execute it, burning a hole immediately.
3, there is an overburn in the corners. I saw other machines switching off the laser for the corners. I do not know if that is correct or not, but what I know is unfortunately there is overburn in the corners.
Can you help with these please?
If you only want a single on/off, use the ‘GRBL’ profile. This uses the M4 command (variable power) and takes advantage of the fact that GRBL with variable power also supports ‘laser mode’, which means G0 moves do not fire the laser, so there is no need to turn it off between cuts.
This is why CNC controllers are a poor fit for lasers. Laser controllers have variable power output where the power is varied by the speed of the move. At a dead stop, the laser is off completely, and as the head ramps up to the requested speed, the power is ramped up as well. What you are seeing is constant power output. This is fine for a spindle, but a laser is more like an airbrush - if you slow down, you need to reduce the output or you get a dark spot.
Unless the UCCNC has a variable power mode there’s not much that can be done here.