I have purchased a JTech 4.2W laser as an add-on to my XCarve, and I have a question about best practices synchronizing the work zero between the spindle zero and the laser zero, as I anticipate jobs where I laser profiles that have been cut with the spindle.
I typically work with Fusion 360 or SolidWorks to generate CAM, and I set part zero to be the left front top of the stock. This point is touched off or probed and the zero stored in G54. I also have some jigs that have mechanical locating pins to the machine bed, and I have UGS macros that correspond to different jigs. So I can run the macro for “jig 12” and it sets G54 to the zero point for that jig.
Given that the laser will live at a fixed offset from the spindle zero, it should be possible to write a macro called “Go Laser” that sets the various grbl options to laser mode, grabs whatever the current work zero is from G54, adds the laser mount offset, stores that value in G55, and switches the working coordinate system to G55. “G0 X0 Y0” would then move the laser directly to the zero point of the part or jig without losing the spindle zero for when I switch back to milling mode (for part cutout).
Playing with the software though, I don’t see a way to switch which work coordinate system is active, nor do I see a way to tell it to use the G54 zero.
Maybe I’m just blind?
Also, what is the best way to import part geometry from Fusion or SolidWorks, so as to generate reference geometry for use in Lightburn, either for direct use as a cut path or as reference for creating paths in Lightburn?
Macros are just stored sequences of commands - they don’t evaluate anything, so making one that reads an offset and adjusts it isn’t possible. It’s also not possible to use G55 in LightBurn - it emits code that forces the G54 space.
If you run LightBurn in “Absolute Coords” mode, and have $10=0, LightBurn will run relative to whatever zero point you have enabled in the machine, so the only tricky bit would be offsetting the job by the difference between the laser and spindle.
LightBurn was written for dedicated laser machines, not hybrid systems, so we don’t have functionality like this built in.
Put a dollar value in it; I bet the user bases of the various add-on lasers are large enough to support the project cost. Maybe JTech will underwrite it.
There’s a number of different code paths to skin this cat - the “Go Laser” macro need not be a “macro” but can be a native subroutine; if switching Lightburn to G55 is too much, maybe the spindle workspace switches to G55, Lightburn pulls the G55 zero and sets G54.
So long as the effect is the ability to set a spindle zero in UGS, enter Lightburn, press “Go Laser”, and have the laser line up on spindle zero, I’m agnostic as to how that happens.