I’ve managed to overcome the space-burn in the generated code from Lightburn which can be simply overcome with a quick macro or search/replace in a text editor.
Indeed, I can conclude that Snapmaker g-code only controls laser power simply by a using the P[xxx] parameter as a function of percent in the M03 command block and M05 in conjunction with a G0 rapid.
But by adding the P0 to your G1 with S0 overcomes this. So there is no need to resort to G00 rapid commands after all. This has now made it useful enough to work with Lightburn as a g-code generator.
I’ll run through a few different modes within your software just to make doubly sure but I’m hopeful! Assuming no show-stoppers I’ll grab a licence for this value alone.
I did do some control tests via the USB/serial and after finding the correct baud managed to get some predictable control jogging/homing.
Two issues further;
- Machine co-ords are calculated at x400 the expected value (a move of 10mm equates to a co-ord change of 4000)
- Due to the inclusion of the P% laser power control parameter, naturally the laser ‘fire’ function does not work.
Looking at the console, work co-ords are being returned but some commands yield a ‘?’. My next move will be to port sniff the data in and out and see what’s what.
Attached photo of correct result, plus g-code. SN_test_2.txt