Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Filament Presence & Trigger via Same Input?

    Third-party add-ons
    2
    6
    104
    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.
    • CCS86
      CCS86 last edited by

      Hi guys,

      I am trying to configure an Orbiter filament presence sensor on my Maestro.

      My issue is that the filament presence lead essentially needs to perform 2 functions:

      • Runout detection via M591
      • Trigger for filament auto-load

      These are my configuration lines, but it won't accept the M950 because "pin not free".

      M591 D0 P1 C"e0stop" S1 			  	; presence sensor connected to E0 endstop for drive 0, enabled
      M950 J1 C"e0stop"					; define logical input for filament auto load
      M581 P1 T2 S0 R0 					; define trigger for filament auto load triggers trigger2.g
      M950 J2 C"e1stop"					; define logical input for filament unload
      M581 P2 T3 S0 R0 					; define trigger for filament auto load triggers trigger3.g
      

      Is there a way to use that e0stop pin for double duty, or do I have to split the wire and run it to a second pin?

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

        @CCS86 you could not define it directly as a filament presence sensor and then change the behaviour of the trigger depending on either the state of the machine or some variable in start gcode or filament load gcode or both.

        www.duet3d.com

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

          @T3P3Tony said in Filament Presence & Trigger via Same Input?:

          @CCS86 you could not define it directly as a filament presence sensor and then change the behaviour of the trigger depending on either the state of the machine or some variable in start gcode or filament load gcode or both.

          Could, or could not?

          It seems viable to have full functionality as a presence sensor and as an autoload trigger, since they each work in opposite directions with the signal.

          Not present > present = autoload trigger
          Present > not present = filament runout

          @dc42 Is this something that could be implemented in a future version?

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

            @CCS86 said in Filament Presence & Trigger via Same Input?:

            Could, or could not?

            Sorry! could!

            @CCS86 said in Filament Presence & Trigger via Same Input?:

            It seems viable to have full functionality as a presence sensor and as an autoload trigger, since they each work in opposite directions with the signal.
            Not present > present = autoload trigger
            Present > not present = filament runout

            you should be able to use conditional gcode within your trigger macro to implement this functionality.

            www.duet3d.com

            CCS86 1 Reply Last reply Reply Quote 1
            • CCS86
              CCS86 @T3P3Tony last edited by

              @T3P3Tony said in Filament Presence & Trigger via Same Input?:

              you should be able to use conditional gcode within your trigger macro to implement this functionality.

              Could you shed some light on this?

              Would I use M591 to define the pin for filament sensing, then skip the M950? Can the M581 reference the pin defined in the M591?

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

                @CCS86 one option is to undefine it as a filament sensor and define it as a trigger in your sprint start and end macros. Roughly (untested):
                start gcode:

                M950 J1 C"nil" ; free up the pin
                M591 D0 P1 C"nil"
                M581 T2  P-1
                

                end gcode:

                M591 D0 P0
                M950 J1 C"e0stop"
                M581 P1 T2 S0 R0
                

                The other option is keep it as a trigger the whole time (which is probably easier) and have the conditional gcode to check the state (https://github.com/Duet3D/RepRapFirmware/wiki/Object-Model-Documentation#statestatus)

                e.g.

                ;trigger2.g
                if state.status = "processing"
                   M98 filament-error.g ;example of some logic to handle the filament out situation
                else
                  ;the existing logic to handle filament loading.
                

                www.duet3d.com

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