Laser as a bit selection option

I am still struggling to get the laser cutting and engraving working even with the extra programs people here recommend. Would it be possible to add a laser bit option that just changes the Z commands to on off for the laser?

1 Like

What would have to change about the g-code exactly? Can you give a before / after?

I was able to control a laser by connecting a relay to a PWM output (designated for spindle control) in the X-Carve controller. Conceptually should also work on arduino based controllers.

I can only do ON or OFF laser control, since I only had a relay and no power control unit.

I would generate Gcode within easel and then maniputale the file in excel to replace G1 Z movements by Spindle commands M5 (laser off) and M3 (Laser on).
This worked very well.

I run my laser on a different machine, but I use Easel and export the Gcode to run in Repetier.

I set my cut depth to .1mm, then set my depth per pass to .1mm to ensure only 1 pass is generated.

Export the Gcode

Replace Z up to safety height with M107 to turn my laser off
Replace Z down to .1mm with M106 S123 to set my laser on/power

Since we use different codes, it would be nice (for me) to be able to specify what code we want to send to “stop” an object (turn laser off) and what we want to start an object (turn laser on) - which would replace Z up and Z down - at least for engraving only.