I'm having one of those moments.

I’m having one of those moments. Have not used the K40 with uno GRBL controller for about 4 months. Have done a couple of days just using it to cut with no problems.
But when I try to do some raster engraving, it goes pear shaped.
It appears the laser just goes to full power and ignores any S setting, it even turns the laser on when it does the first G0 move to set start location.
Problem is I am sure it all was ok when I used it months ago as I have several jobs that I have done but can’t remember what I have done.
Even the gcode that was produced months ago does the same thing???

Start gcode with M4 S0?

this is the gcode output still fires laser when moving to start position

G21 ; Set units to mm
G90 ; Absolute positioning
$H
M4 S0

; Pass 0

; First Move

G0 X24.50 Y10.10 M04 S0 ( fires laser full power )

; Generated by LaserWeb (lw.raster-to-gcode.js)
; Size : 0 x 0 mm
; PPI : x: 300 - y: 300
; PPM : x: 0.0846666667 - y: 0.0846666667
; Tool diam. : 0.2 mm
; Feed rate : 3000 mm/min
; Beam range : 0 to 256
; Beam power : 0 to 50 %
; Options : trimLine, joinPixel, burnWhite

G1 F3000

laser just runs flat out

G1 X24.50 Y10.10 S0.0000
X24.70 S0.5020
X24.90 Y10.30 S0.0000
X24.50 S0.5020
Y10.50 S0.0000
X24.80 S1.0039
X24.90 S0.5020
X25.10 Y10.70 S0.0000
X24.80 S1.0039
X24.60 S1.5059
X24.40 S4.0157
X24.20 S3.5137
X23.90 S1.0039
X23.70 Y10.90 S0.0000
X23.80 S0.5020
X24.20 S1.0039

this is something that I did several months ago so totally lost as to what has happened

aa78fca581bdc0f4c4a561fb1f861dd1.jpeg

are you using the newer version of grbl with the new laser option? check to see if $32 is on or not that might remedy your problem.

I checked everything and the settings are correct, Iread the GRBL documentation and it should not fire the laser during a G0. Which makes me think I have a hardware problem, either the laser power supply or the Uno has got a faulty pin.
Will look at it when I get up tomorrow

well someday’s the light is on but nobody is home,and that is what I had.
When I was using the K40 last time the electronics were hanging out the side as I had just converted it to the UNO. when I finished and put it away I mounted everything inside. and the PWM wire had fallen of at the UNO end.
So open circuit puts the Laser into 100% mode, inverse to what I would have expexted.
So all is good and thank you for those with suggestions, and those that maintain this software

lol a classic facepalm moment, glad its resolved :slight_smile: