Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Conditional resume after filament error

    Scheduled Pinned Locked Moved
    Gcode meta commands
    2
    3
    241
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jphillyundefined
      jphilly
      last edited by

      I've been trying to set up filament-error.g to resume automatically if it hasn't failed recently but M24 doesn't seem to be working in the script.

      var curtime = state.upTime
      
      M83            ; relative extruder moves
      G1 E-10 F3600  ; retract 10mm of filament
      G91            ; relative positioning
      G1 Z5 F360     ; lift Z by 5mm
      G90            ; absolute positioning
      G1 X0 Y200 F6000 ; go to X=0 Y=200
      
      ; filament error:
      if var.curtime - global.lastfail > 30
      	G4 S3
      	M24
      else
      	G0 X200
      	echo {var.curtime - global.lastfail}
      

      global.lastfail is set in resume.g and I can echo that so it's set. I can get a move to work in the if clause but M24 is not triggering.

      T3P3Tonyundefined 1 Reply Last reply Reply Quote 0
      • T3P3Tonyundefined
        T3P3Tony administrators @jphilly
        last edited by T3P3Tony

        @jphilly I can recreate the problem in my test setup and I believe the issue is related to the way pausing is currently working with filament-error.g.

        here is a related thread:
        https://forum.duet3d.com/topic/25458/filament_runout_distance_mm-or-similar-at-reprap

        What appears to be happening is filament-error.g is running. and then the print pause completes, so any resume command within filament-error.g comes in prior to the pause state being set in firmware.

        When the issues with the pause always happening when a filament error is triggered and filament-error.g is present is fixed, then your macro should be able to be changed to not call a pause if you want the printer to resume. Also, depending on how quickly it runs, you may be able to do your test first, and then not stop printing at all if you would have resumed - will need to test that once this is implemented.

        www.duet3d.com

        jphillyundefined 1 Reply Last reply Reply Quote 0
        • jphillyundefined
          jphilly @T3P3Tony
          last edited by

          @t3p3tony I thought it was probably running completely then pausing because it moved, dwelled, then popped up saying it was paused. I tried offloading the dwell and resume to another macro and calling that instead which seems to have removed the noticeable dwell but it doesn't resume so it's hard to tell if it's doing anything. I guess I'll just have to retry when it gets added

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA