Hi All,
I have two simple squares drawn on LB and a volt meter over my PWM output which will eventually drive a co2 laser. Between the move from the first to the second square the PWM signal stays on. All my searches say $32=0. But I definitely have $32=1.
Here’s the generated gcode, I don’t see where S=0 until the end ?
; LightBurn 1.4.00
; GRBL device profile, current position
; Bounds: X0 Y0 to X177.87 Y41
G00 G17 G40 G21 G54
G91
M4
; Cut @ 50 mm/sec, 50% power
M8
G0 X0Y2.5
; Layer C03
G1 Y30S50F3000 ;power set to 50%
G1 X30
G1 Y-30
G1 X-30
;second square
G0 X59.479Y-1.5 ;laser stays on during this travel
G1 Y40
G1 X40
G1 Y-40
G1 X-40
G0 X118.394Y-1
M9
G1 S0 ;power set to 0%
M5
; return to starting pos
G0 X-177.873Y0
M2
Here’s my GRBL params:
$$
$0=10
$1=25
$2=0
$3=3
$4=0
$5=0
$6=0
$10=1
$11=0.010
$12=0.002
$13=0
$20=0
$21=1
$22=1
$23=3
$24=500.000
$25=1000.000
$26=250.000
$27=5.000
$30=100.000
$31=0.000
$32=1
$100=80.000
$101=80.000
$102=80.000
$103=100.000
$104=100.000
$105=100.000
$110=500.000
$111=500.000
$112=3000.000
$113=1000.000
$114=1000.000
$115=1000.000
$120=1000.000
$121=1000.000
$122=10.000
$123=200.000
$124=200.000
$125=200.000
$130=605.000
$131=410.000
$132=50.000
$133=300.000
$134=300.000
$135=300.000
If I use GRBL-M3 it works as expected- the PWM voltage is 0 between moves. Have I missed something simple ? I am using GRBL ESP32 1.3a- the latest version.
Im pretty sure it is: at 50% power I get 2.5Volts over the PWM output and at 100% I get 5 volts and $32=1- you can see that in the grbl params posted. Further nothing I see in the GCODe is actually turning off the laser
Here’s the relevant part of my machine config file-
// Laser pin set #define SPINDLE_TYPE SpindleType::PWM
Thanks, yes I looked up the grbl docs more thoroughly and G0 should turn off the laser power so that explains the gcode part of my post
It’s grbl esp32 by bdring on an MKS DLC32 v2.1 (I removed the stock MKS firmware)
That’s an interesting point thanks for the suggestion
SOLVED:
I changed #define SPINDLE_TYPE SpindleType::PWM to #define SPINDLE_TYPE SpindleType::LASER
and it works as expected now, I suspect SpindleType::PWM is for CNC spindles which shouldn’t turn off during travels. Pretty silly mistake on my part
Thank you @Wyked and @berainlb for your assistance, much appreciated.