Laser PWM with Release 2.05.1 (Duet 2) - missing line



  • I've got a Duet 2 driving an Ender 3 with a laser module attached. I'm using the PWM circuit from the Duet Wiki. Its working well but it occasionally does a cut move with the laser turned off.

    In the attached gcode file, the laser is off for line 1937:
    PCB Jig 100x70.gcode

    1936> G1 S255 X57.50 Y146.00
    1937> G1 S255 X88.70 Y146.00
    1938> M5

    There are many similar lines in the gcode file so why does the laser turn off for just this one?
    IutUMSYg.jpeg



  • is it repeatable? if you execute the same gcode twice, will this happen again on the same line?



  • Hi @FelixH,

    Yes, this is repeatable. The gcode file has 10 repeats and the laser is off at this traverse every time.



  • presumably that is the missing cut for the top left flexture, and as such not the longest or shortest cut that should eliminate issues with acceleration or speed?



  • @bearer That's correct. The only thing that stands out to me is that its the last move in a section followed by M5 (laser off)



  • @sprocket said in Laser PWM with Release 2.05.1 (Duet 2) - missing line:

    e last move in a section followed by M5 (laser off)

    sounds relevant; try inserting M400 before M5 (to wait for the moves to finish before executing M5)?



  • Does it only happen with this Gcode in particular? You could try a manually generated Gcode, for instance


  • administrators

    The whatsnew file for RRF 3.1.0 includes this under Bug Fixes:

    M3 and M5 commands in laser mode were sometimes executed too early, typically by 1 move

    So upgrading to RRF 3.1.1 (and converting your config.g file to suit) may fix it.



  • Oh dear... I will have to do that as well then, when my laser arrives...



  • if upgrading is something you really don't want to do, i would think most cam packages will allow you to specify both M400 M5 to try to work around the bug (or post process it with sed)

    on the other hand RRF3 is imho stable enough to make it worth while upgrading and the forum will have most config changes covered as well.



  • Thanks everyone. I'll bite the bullet and upgrade now then.



  • @bearer thanks for your input!
    There is only one serious issue refraining me from upgrading the firmware and it is my laziness. I know that for things to work, I will have to make changes on my config.g files and I have been delaying it because of laziness... Fortunately a friend of mine gave me (like as a gift) a damaged Duet which I was able to repair by just reflowing the ESP32 module, so now I have a Duet for these kind of tests...

    Another thing is that my CNC runs with the Ooznest version of the firmware and I am somehow hesitant to change it. I guess that they just customized the Web Interface and not the firmware itself, but, well... I don't know


Log in to reply