Filament error when filament loaded
-
@achrn
It's almost certainly switch bounce.
I get the same thing.
You can insert a delay to check.
This is my filament-error.g file;0:/sys/filament-error.g ;run when a filament sensor error is detected. Print will be paused bt Daemon.g after runout distance. var runoutDistance = 350 ; this is just so you can change easily ; first check that we are not currently in an error state and the switch has been toggled again. if (global.filamentDistance !=0) || (state.status != "processing") echo "Filament sensor triggered, but no print in progress. No action taken" M99 ; exit macro ;echo "filament-error.g run" G4 P10 ; delay 10ms to debounce if sensors.filamentMonitors[0].status="ok" echo "switch bounce detected - error cancelled" M99 ; break out if sensor value is zero again (bouncing) echo {"Filament error type " ^ param.P ^ " detected on extruder " ^ param.D} ;M291 R"Filament Error" P{"Filament error type " ^ param.P ^ " detected on extruder " ^ param.D} S1 T3 var thisExtruderValue = move.extruders[tools[state.currentTool].filamentExtruder].position set global.filamentDistance = var.thisExtruderValue + var.runoutDistance echo "filament error detected - print will be paused after " ^ var.runoutDistance ^ "mm"
I also ignore it if I'm not in a print
EDIT:
To complete, my daemon.g has this code to allow for the distance between my spool and the extruder, so as not to waste that filament.while true ; necessary only if you want less than 10 seconds between checks if (state.currentTool != -1) && (state.currentTool < #tools) if (move.extruders[tools[state.currentTool].filamentExtruder].position > global.filamentDistance) && (global.filamentDistance !=0) && (state.status = "processing") echo "paused called from daemon - filament runout" M25 ; pause print if filament has run out G4 S2 ; add a smaller delay for these checks
-
@owend It's not as simple as switch bounce - it doesn't occur under 3.3 (I've reverted and tested).
I think filament errors are being generated in cases that previously did not generate them - but that doesn't seem to be noted in the release notes (though I have been known to miss things in the release notes previously).
I generally don't have a filament-error.g and just let the machine pause.
Under 3.3, if filament runs out, the machine pauses, I manually run change filament (which process involves taking out the remnant of the old and feeding in the new) then click resume.
Under 3.4, if filament runs out the machine pauses, I get a couple of filament error messages, I run a filment change and get another one at the point of feeding in new filament:
then I resume the print.The multiple filament errors are somewhat annoying, but more significantly they make coding macros more difficult, because they need to include more state awareness to know whether they are a duplicate due to one running.
Is this behaviour intended? Will it revert to the 3.3-like behaviour, which seems to only raise filament errors if printing, or does filament error logic now need to accomodate triggering at any time (even if machine is idle)? I think the latter makes it more difficult to rely on the fallback pause functionality.
-
@achrn
Your M591 config should only throw an error during a print.
To be honest I can't remember why I started checking the state of the machine or when (3.3 seems so long ago)
I have a feeling I was getting messages while changing the filament during a pause.
This was definitely bounce.
There have been changes to filament sensor code, not least the change of the macro name, but I don't know the extent and perhaps my macro has masked what you are seeing? -
@owend Thanks for the input.
For now, I've set a filament-error.g with a check of machine status and then a M25 so it goes to a pause. However, I haven't tested it (and I've got a print running I don't want to jeopardise, so I'm not going to cut the filament).
-
I have the same problem - from 3.4 I have the behaviour that even during filament loading I get an filament error so the loading is canceled
-
@taconite
I've also got the same issue with 3.4 - just switched to a simple switch sensor and if I remove filament (like when loading/unloading) it throws:Error: M25: Cannot pause print, because no file is being printed! Error: Filament error on extruder 0: noFilament
@OwenD can you share the code for your filament-error.g machine status check?
@dc42 any thoughts on what might be causing this? Shouldn't the filament sensor be entirely ignored if it's not currently printing?
-
@adammhaile said in Filament error when filament loaded:
@taconite
I've also got the same issue with 3.4 - just switched to a simple switch sensor and if I remove filament (like when loading/unloading) it throws:@OwenD can you share the code for your filament-error.g machine status check?
Scroll up a bit
https://forum.duet3d.com/post/273351 -
@owend
ok - nevermind. I thought you were referring to a new check you had added. -
For now I've added M591 commands to start.g, stop.g, and cancel.g to keep filament monitoring enabled only when actually printing and now I don't get and spurious errors.
-
@adammhaile said in Filament error when filament loaded:
For now I've added M591 commands to start.g, stop.g, and cancel.g to keep filament monitoring enabled only when actually printing and now I don't get and spurious errors.
For anyone else finding this in the future it can also be useful to put them in the tool change files for multi tool printers.
-