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

    filament-error#.g usage help? Avoid pausing on sensorerror?

    Scheduled Pinned Locked Moved
    Filament Monitor
    7
    13
    1.2k
    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
      last edited by

      @clegg78

      *Upgrade notes:

      The handling of filament errors have changed. When a filament error occurs, an event is created. To handle the event, RRF runs macro file filament-error.g without appending the extruder number to the file name and without pausing the print first. The extruder number is passed as param.D along with some other parameters. If filament-error.g is not found then the print is paused (running pause.g) and the error is reported.*

      clegg78undefined 1 Reply Last reply Reply Quote 0
      • clegg78undefined
        clegg78 @OwenD
        last edited by

        @owend

        I ended up with this being my config for filament-error.g. Since a rotating magnet filament sensor, "tooLittleMovement" doesnt seem to be a "status" of the sensor, so I just made a config to filter out transient issues (sensorError and noDataRecieved) and only stop the printer if those 2 status conditions are not present.

        if {param.D ^ ""} = "0"
        	if sensors.filamentMonitors[0].status = "sensorError"
        		echo "SensorError-0 Continuing to Print"
        		
        		M99
        	if sensors.filamentMonitors[0].status = "noDataReceived"
        		echo "noDataReceived-0 Continuing to Print"
        		
        		M99
        	echo "Too Little Movement-0-Paused"
        	M291 p"Filament Sensor 0 - Too Little Movement" S1
        	M25 ;pause the print
        	
        if {param.D ^ ""} = "1"
        	if sensors.filamentMonitors[1].status = "sensorError"
        		echo "SensorError-1 Continuing to Print"
        		M99
        	if sensors.filamentMonitors[1].status = "noDataReceived"
        		echo "noDataReceived-1 Continuing to Print"
        		M99
        	echo "Too Little Movement?-Paused"
        	M291 p"Filament Sensor 1 - Too Little Movement" S1
        	M25 ;pause the print
        
        M99
        

        A geek designing and building his own custom IDEX printer from scratch as seen here: https://joekelly.co/3d/

        OwenDundefined Argoundefined 2 Replies Last reply Reply Quote 1
        • OwenDundefined
          OwenD @clegg78
          last edited by

          @clegg78
          Glad you got it working.
          There's no real need to duplicate the code for each sensor as you can use the D parameter to show which is in error state.

          if sensors.filamentMonitors[param.D].status = "sensorError"
          	echo "SensorError- sensor : " ^ param.D ^ " Continuing to Print"
          	M99
          
          if sensors.filamentMonitors[0].status = "noDataReceived"
          	echo "noDataReceived -sensor " ^ param.D ^ "Continuing to Print"
          	M99
          
          ; catch all for any other error type
          echo "Filament error on sensor " ^ param.D ^ " - Paused"
          echo param.S ; echo the entire error for clarity
          M291 P{"Filament Sensor"  " ^ param.D ^ " - Paused"} S1
          M25 ; pause the print
          
          clegg78undefined 1 Reply Last reply Reply Quote 1
          • clegg78undefined
            clegg78 @OwenD
            last edited by

            @owend ahh yeah! thanks I'll clean that up 🙂

            A geek designing and building his own custom IDEX printer from scratch as seen here: https://joekelly.co/3d/

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

              @clegg78
              You might also want to do a check at the start to see if there is an active tool so that if you remove the filament at any time from a second (inactive) tool it doesn't pause.
              Likewise you could check to see if the sensor that is raising the error belongs to the active tool, but I can't see a way to see which tool(s) each sensor is associated with in the object model.

              1 Reply Last reply Reply Quote 0
              • Argoundefined
                Argo @clegg78
                last edited by Argo

                @clegg78

                I too get a sensor error every 20h or so and I did just put this into filament-error.g:

                if sensors.filamentMonitors[0]status != "sensorError"
                        M25
                
                juanito16kundefined 1 Reply Last reply Reply Quote 1
                • Phaedruxundefined Phaedrux referenced this topic
                • Henkerundefined
                  Henker
                  last edited by

                  I tried to monitor the sensor status, but I suppose I made an error somewhere.

                  I always get "OK" status when reading the sensor status after an error.

                  var StatusTest = sensors.filamentMonitors[0].status
                  
                  if {var.StatusTest} = "sensorError"
                  	M291 P{var.StatusTest} S1
                  	;M291 P"Filament Sensor - Sensor Error" S1
                  	M24
                  	M99
                  if {var.StatusTest} = "noDataReceived"
                  	M291 P{var.StatusTest} S1
                  	;M291 P"Filament Sensor - No data received" S1
                  	M24
                  	M99
                  if {var.StatusTest} = "tooMuchMovement"
                  	M291 P{var.StatusTest} S1
                  	;M291 P"Filament Sensor - tooLittleMovement" S1
                  	M24
                  	M99
                  if {var.StatusTest} = "tooLittleMovement"
                  	M291 P{var.StatusTest} S1
                  	;M291 P"Filament Sensor - tooLittleMovement" S1
                  	M25
                  else
                  	M291 P{var.StatusTest} S1
                  
                  

                  This look like I don't read the right value or it's refreshed since the event was raised and called the filament-error.g

                  Any help will be appreciated

                  1 Reply Last reply Reply Quote 0
                  • juanito16kundefined
                    juanito16k @Argo
                    last edited by juanito16k

                    @Argo said in filament-error#.g usage help? Avoid pausing on sensorerror?:

                    @clegg78

                    I too get a sensor error every 20h or so and I did just put this into filament-error.g:

                    if sensors.filamentMonitors[0]status != "sensorError"
                            M25
                    

                    I also needed to use this workaround because meanwhile all values, from agc to calibration and what ever is needed to get this magnetic filament monitor to work, are fine i still get this filament error which i cant debug because i dont get any information what the error is actually about...

                    this whole filament monitor is not a finished product as duet is selling it - its at best experimental!!! The time i spend to get it working was crazy and i think as consumer you should know this befor buy!!!

                    juanito16kundefined 1 Reply Last reply Reply Quote 0
                    • juanito16kundefined
                      juanito16k @juanito16k
                      last edited by juanito16k

                      @juanito16k Screenshot 2025-01-04 191529.jpg

                      also this what should this min -710% and max 468% tell me... also didnt stop the print and didnt trigger any alarm ...Screenshot 2025-01-04 192407.jpg

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

                        @juanito16k Have you started a thread for your issue? It would be easier to troubleshoot if we discuss it there instead of in a 3 year old thread.

                        Z-Bot CoreXY Build | Thingiverse Profile

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