• Tags
  • Documentation
  • Order
  • Register
  • Login
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.
  • undefined
    clegg78
    last edited by 21 Mar 2022, 22:42

    Hey there, I went to 3.4 for many reasons but a main one was being able to control what happens depending on the state of filament sensors. I get random "sensorError" errors for my Duet rotating magnet filament sensors. I have since I got them back in 2020, I've learned to live with it and the errors are rare, but always seem to happen when I am away from the machine or asleep.

    After setting up the files in a way that I think works - I still get the printer pausing on "sensorError"

    I have 2 extruders (IDEX) and have filament-error1.g and filament-error2.g setup the same. I don't have filament-error.g because I didn't think I needed it.

    I put this into the filament-error0.g (same but different extruder number for 1)

    if sensors.filamentMonitors[0].status = "tooLittleMovement"
    	;Execute Pause	
    	;Print the pause is cause of too little movement
    
    	M291 p"Filament Sensor 0 - Too Little Movement" S1
    	M25 ;pause the print
    if sensors.filamentMonitors[0].status = "sensorError"
    	;Continue Print if cause is sensor error and continue
    
    	M291 p"Filament Sensor 0  - Sensor Error - Continuing to print" S1
    	;M24 (not needed?)
    M99 ; Exit the macro
    

    ... I guess ... what am I missing, or doing wrong that the sensor error still seem to trip the printer? I've also had sensorErrors come up for the extruder not being printed. I think it could be static or signal noise related. But at this point I mainly want to just ignore these errors and just watch for too little movement or too much movement errors.

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

    1 Reply Last reply Reply Quote 0
    • undefined
      OwenD
      last edited by 22 Mar 2022, 02:30

      In 3.4 there have been numerous changes.
      You'll need to read the change logs.
      You no longer use the numbered files and the file names have changed.

      undefined 1 Reply Last reply 22 Mar 2022, 03:00 Reply Quote 1
      • undefined
        clegg78 @OwenD
        last edited by 22 Mar 2022, 03:00

        @owend Huh, I read the current documentation and it talks about them still... I guess I didn't realize the changelog meant it wouldn't talk to the numbered ones as the documentation says.

        I'll move the code into the general filament-error.g and see how it goes 🙂

        Thanks for the clarification.

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

        1 Reply Last reply Reply Quote 0
        • undefined
          OwenD
          last edited by 22 Mar 2022, 08:20

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

          undefined 1 Reply Last reply 24 Apr 2022, 20:26 Reply Quote 0
          • undefined
            clegg78 @OwenD
            last edited by 24 Apr 2022, 20:26

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

            undefined undefined 2 Replies Last reply 24 Apr 2022, 22:52 Reply Quote 1
            • undefined
              OwenD @clegg78
              last edited by 24 Apr 2022, 22:52

              @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
              
              undefined 1 Reply Last reply 24 Apr 2022, 22:55 Reply Quote 1
              • undefined
                clegg78 @OwenD
                last edited by 24 Apr 2022, 22:55

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

                undefined 1 Reply Last reply 24 Apr 2022, 23:09 Reply Quote 0
                • undefined
                  OwenD @clegg78
                  last edited by 24 Apr 2022, 23:09

                  @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
                  • undefined
                    Argo @clegg78
                    last edited by Argo 26 Apr 2022, 23:33

                    @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
                    
                    undefined 1 Reply Last reply 4 Jan 2025, 13:03 Reply Quote 1
                    • undefined Phaedrux referenced this topic 3 Jun 2022, 20:14
                    • undefined
                      Henker
                      last edited by 4 Jul 2022, 01:46

                      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
                      • undefined
                        juanito16k @Argo
                        last edited by juanito16k 1 Apr 2025, 13:04 4 Jan 2025, 13:03

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

                        undefined 1 Reply Last reply 4 Jan 2025, 18:22 Reply Quote 0
                        • undefined
                          juanito16k @juanito16k
                          last edited by juanito16k 1 Apr 2025, 18:25 4 Jan 2025, 18:22

                          @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

                          undefined 1 Reply Last reply 4 Jan 2025, 19:58 Reply Quote 0
                          • undefined
                            Phaedrux Moderator @juanito16k
                            last edited by 4 Jan 2025, 19:58

                            @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