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

    FILAMENT_RUNOUT_DISTANCE_MM or similar at reprap?

    Scheduled Pinned Locked Moved
    Firmware wishlist
    6
    24
    1.6k
    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.
    • apakundefined
      apak @dc42
      last edited by

      @dc42 yes. It´s a direct extruder, but with reversed bowden of 400mm, and at the beginning of the reversed bowden it´s the filament sensor, so It would be nice to extrude at leat 90% of that lenght in order not to waste that filament

      1 Reply Last reply Reply Quote 0
      • apakundefined
        apak @OwenD
        last edited by apak

        @owend Looking at how caribou3d duet handles the sensor
        https://github.com/Caribou3d/CaribouDuet2Wifi-ConfigurationMacros

        may be, on trigger we could deactivate sensor, continue printing for var runoutDistance, and then trigger pause, reactivate, load an resume

        ??

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

          @apak @OwenD I am working on recreating this issue because it looks like there is a pause happening which should not be happening if the filament-error.g file is present.

          www.duet3d.com

          T3P3Tonyundefined apakundefined 2 Replies Last reply Reply Quote 0
          • T3P3Tonyundefined
            T3P3Tony administrators @T3P3Tony
            last edited by

            I have recreated this - and moved it to firmware wishlist section as the behaviour will need to be changed to allow the filament out logic to run without a pause.

            www.duet3d.com

            OwenDundefined apakundefined DonStaufferundefined 3 Replies Last reply Reply Quote 0
            • OwenDundefined
              OwenD @T3P3Tony
              last edited by OwenD

              @t3p3tony
              Thanks Tony 👍

              1 Reply Last reply Reply Quote 0
              • apakundefined
                apak @T3P3Tony
                last edited by

                @t3p3tony thanks

                1 Reply Last reply Reply Quote 0
                • apakundefined
                  apak @T3P3Tony
                  last edited by apak

                  @t3p3tony does this feature have an ETA?

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

                    @apak no ETA yet.

                    www.duet3d.com

                    1 Reply Last reply Reply Quote 0
                    • T3P3Tonyundefined T3P3Tony referenced this topic
                    • T3P3Tonyundefined T3P3Tony referenced this topic
                    • T3P3Tonyundefined T3P3Tony referenced this topic
                    • DonStaufferundefined
                      DonStauffer @T3P3Tony
                      last edited by DonStauffer

                      @t3p3tony Tell me if I'm correct:

                      A workaround should be possible by setting a global variable in filament-error.g if you want to cancel the pause. pause.g checks for the variable, and does an M24 if the variable was set, instead of its usual commands.

                      Do you think this would work? Or would it skip pause.g if filament-error.g ran, giving you no opportunity to cancel the pause? I'm uncertain whether pause.g gets run or not if filament-error.g exists. I know it's not supposed to.

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

                        @donstauffer if filament-error.g runs then pause.g does not run AFAIK. The issue is that there is always a pause as part of the process no matter which macro is called.

                        www.duet3d.com

                        DonStaufferundefined 1 Reply Last reply Reply Quote 0
                        • DonStaufferundefined
                          DonStauffer @T3P3Tony
                          last edited by

                          @t3p3tony Confirmed. pause.g doesn't run.

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

                            Just confirming that this is now possible with 3.4.0b7
                            Albeit you must be aware that the macro called is now filament_error.g, not filament-error.g
                            i.e. must have an underscore "_" and not a hyphen "-"
                            There is also a problem if filament_error.g contains an M291 as described here

                            filament_error.g

                            ;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 already 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.g run - print will be paused after " ^ var.runoutDistance ^ "mm"
                            

                            In daemon.g
                            (Note this is run in a while loop so it's called at intervals less than 10 seconds)

                            while true
                            	; I have a bunch of other stuff in here
                            	;check the filament runout
                            	if state.currentTool != -1
                            		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 delay for these checks
                            

                            In resume.g we reset the distance

                            if sensors.filamentMonitors[0].status="ok"
                            	set global.filamentDistance = 0 ; reset filament sensor extrusion distance
                            ;do all the other stuff needed for resuming
                            

                            You also need to set the distance to zero in start.g

                            if sensors.filamentMonitors[0].status="ok"
                            	set global.filamentDistance = 0 ; reset filament sensor extrusion distance 
                            else
                            	abort "Filament sensor shows no filament loaded.  Print aborted"
                            

                            and of course define the global in config.g

                            if !exists(global.filamentDistance)
                            	global filamentDistance = 0 ; global for use to allow filament to feed for set distance after sensor trips 
                            else
                            	set global.filamentDistance = 0
                            
                            apakundefined 1 Reply Last reply Reply Quote 2
                            • apakundefined
                              apak @OwenD
                              last edited by apak

                              thanks, will try

                              MrTwinkysundefined 1 Reply Last reply Reply Quote 0
                              • apakundefined
                                apak
                                last edited by

                                This post is deleted!
                                1 Reply Last reply Reply Quote 0
                                • MrTwinkysundefined
                                  MrTwinkys @apak
                                  last edited by

                                  @apak any word on whether or not this is functioning correctly? I would like to set this up for a reverse Bowden setup also.

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