Conditional resume after filament error
-
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.
-
@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-reprapWhat 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.
-
@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