0

I've been struggling with this for the past three days, and I can't seem to solve this problem. I'm on a Mac and trying to let my 3018 pro cnc machine laser engrave an image, but whatever I do, it always gives this error: "Error 20 - Unsupported or invalid-code command found in block. [M106 P0 S255]. When I remove this line and try to run it I get this error: "ALARM: - Reset while in motion. Grbl cannot guarantee position. Lost steps are likely, Re-homing Aladeen highly recommended. [undefined]"

The part of my code that might be relevant is:

;Header Startenter image description here ;renderMethod: point ;file_total_lines: 1057930 ;estimated_time(s): 27125.609 ;is_rotate: false ;diameter: 40 ;max_x(mm): 153.811 ;max_y(mm): 108.78899999999999 ;max_z(mm): 0 ;max_b(mm): 0 ;min_x(mm): 8.631 ;min_y(mm): 8.658999999999999 ;min_b(mm): 0 ;min_z(mm): 0 ;work_speed(mm/minute): 800 ;jog_speed(mm/minute): 3000 ;power(%): 60 ;work_size_x: 320 ;work_size_y: 350 ;origin: bottom-left ;thumbnail: data:image/png;base64,iVBORw0 ;Header End

; Laser multi-pass, pass 1 with Z = 0 ; G-code for laser engraving ; Generated by Snapmaker Luban ; G-code START <<< G90 G21 M106 P0 S255 G0 F3000 G1 F800 G1 X8.63 Y108.79 M3 P60 S153 M3 G4 P5 M5 G1 X8.63 Y108.45 M3 G4 P5 M5enter image description here

I have read something that it has something to do with not having installed the CH340 driver, so I tried that, and it didn't work. Generating codes from the same image using different software resulted in the same error,

  • Can you be more specific about what kind of machine you have? M106 P0 S255 is a command to set a motor speed of some sort. On some machines, this is a fan. – UncleO Mar 03 '23 at 02:27
  • Also, the g-code doesn't include a G28 command to set the tool to the home position, which is probably where the alarm is coming from. – UncleO Mar 03 '23 at 02:29

0 Answers0