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

    Filament error when filament loaded

    Scheduled Pinned Locked Moved
    Filament Monitor
    5
    11
    852
    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.
    • OwenDundefined
      OwenD @achrn
      last edited by OwenD

      @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
      
      
      achrnundefined 1 Reply Last reply Reply Quote 2
      • achrnundefined
        achrn @OwenD
        last edited by

        @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:
        57cf9bd0-c2ab-4f82-aacc-51be3fc44faa-image.png
        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.

        OwenDundefined 1 Reply Last reply Reply Quote 0
        • OwenDundefined
          OwenD @achrn
          last edited by

          @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?

          achrnundefined 1 Reply Last reply Reply Quote 1
          • achrnundefined
            achrn @OwenD
            last edited by

            @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).

            taconiteundefined 1 Reply Last reply Reply Quote 0
            • taconiteundefined
              taconite @achrn
              last edited by

              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

              Custom ANET A8
              Custom Delta: D-PATCH (Delta Printer with Automatic Tool CHanging) https://forum.duet3d.com/topic/16082/d-patch?_=1596131234754

              All I do here is under this license: CC BY-NC-SA

              adammhaileundefined 1 Reply Last reply Reply Quote 0
              • adammhaileundefined
                adammhaile @taconite
                last edited by adammhaile

                @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?

                OwenDundefined 1 Reply Last reply Reply Quote 0
                • OwenDundefined
                  OwenD @adammhaile
                  last edited by

                  @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

                  adammhaileundefined 1 Reply Last reply Reply Quote 0
                  • adammhaileundefined
                    adammhaile @OwenD
                    last edited by

                    @owend
                    ok - nevermind. I thought you were referring to a new check you had added.

                    1 Reply Last reply Reply Quote 0
                    • adammhaileundefined
                      adammhaile
                      last edited by

                      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.

                      Phaedruxundefined 1 Reply Last reply Reply Quote 1
                      • Phaedruxundefined
                        Phaedrux Moderator @adammhaile
                        last edited by

                        @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.

                        Z-Bot CoreXY Build | Thingiverse Profile

                        1 Reply Last reply Reply Quote 0
                        • Phaedruxundefined Phaedrux moved this topic from Beta Firmware
                        • First post
                          Last post
                        Unless otherwise noted, all forum content is licensed under CC-BY-SA