NB this is generating code for Repetier firmware M452 is only in that firmware (at least as far as teh g-code wiki is concerned)
Your code is using spindle commands to turn the laser power on/off, but it also has an enable pin (see below)
M3: Spindle On, Clockwise (CNC specific)
M5: Spindle Off (CNC specific)
see [github.com]
In the current firmware "Here G1/G2/G3 moves have laser enabled and G0 moves have it disables."
ie you need to find and update
#define SUPPORT_LASER 0 // set 1 to enable laser support
#define LASER_PIN -1 // set to pin enabling laser
#define LASER_ON_HIGH 1 // Set 0 if low signal enables laser
So if your just turning your laser on and off (because it doesn’t have a digital enable pin) use the enable pin to turn it off/on.
Hint, if your laser needs lots of power or a weird voltage use D8 on the ramps, as you can feed in any required voltage into the 11amp normally 12v supply, and it only goes to the heated bed. Don't just try and run it from an IO pin, that will probably draw to much power and kill the IO pin.
You don't lose z, you need that for focusing, you just set it to the correct height manually then hit print and it stays at that height.
Marlin doesn’t support this. (as far as im aware) you need something else, normally I've see them use a fan output and it explicitly turns the laser on and off as needed. No magic G0/G1 stuff
What plug in are you using ? this [jtechphotonics.com] ?
Your code is using spindle commands to turn the laser power on/off, but it also has an enable pin (see below)
M3: Spindle On, Clockwise (CNC specific)
M5: Spindle Off (CNC specific)
see [github.com]
In the current firmware "Here G1/G2/G3 moves have laser enabled and G0 moves have it disables."
ie you need to find and update
#define SUPPORT_LASER 0 // set 1 to enable laser support
#define LASER_PIN -1 // set to pin enabling laser
#define LASER_ON_HIGH 1 // Set 0 if low signal enables laser
So if your just turning your laser on and off (because it doesn’t have a digital enable pin) use the enable pin to turn it off/on.
Hint, if your laser needs lots of power or a weird voltage use D8 on the ramps, as you can feed in any required voltage into the 11amp normally 12v supply, and it only goes to the heated bed. Don't just try and run it from an IO pin, that will probably draw to much power and kill the IO pin.
You don't lose z, you need that for focusing, you just set it to the correct height manually then hit print and it stays at that height.
Marlin doesn’t support this. (as far as im aware) you need something else, normally I've see them use a fan output and it explicitly turns the laser on and off as needed. No magic G0/G1 stuff
What plug in are you using ? this [jtechphotonics.com] ?