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

    Filament Monitor Disbaled for First layer only

    Scheduled Pinned Locked Moved Solved
    Filament Monitor
    4
    11
    458
    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.
    • selva_tviundefined
      selva_tvi
      last edited by

      Hi all,

      We are using Duet 3D Filament Monitor for our IDEX machine,

      Board - Duet 6 XD.

      When we start the print, sometimes for the first layer we need to give baby stepping. Before giving the baby stepping itself, the Filament monitor shows as runout and it pauses the print.

      Is there any way to disable the FRS for the 1st layer and enable from 2nd layer?

      Thanks

      1 Reply Last reply Reply Quote 0
      • jay_s_ukundefined
        jay_s_uk
        last edited by

        maybe something like this in daemon.g

        if job.layer = 0
          M591 D0 P0
        else
          M591 D0 P1 C"e0stop"
        

        or whatever your filament monitor is

        Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

        selva_tviundefined 1 Reply Last reply Reply Quote 0
        • selva_tviundefined
          selva_tvi @jay_s_uk
          last edited by

          @jay_s_uk said in Filament Monitor Disbaled for First layer only:

          if job.layer = 0 M591 D0 P0else M591 D0 P1 C"e0stop"

          Thanks.

          I tried adding the below lines in daemon.g

          if job.layer = 0
          M591 D0 P0
          M591 D1 P0
          else
          M591 D0 P3 C"121.io1.in" E5 S1 R10:190 ; Filament Runout Sensor for tool 0
          M591 D1 P3 C"122.io1.in" E5 S1 R10:190 ; Filament Runout Sensor for tool 1

          Disabled these lines from config.g

          Before starting the print, it shows No Filament present.

          As soon as I hit the print button, the filament monitors are enabled.

          'M591 D1
          Duet3D rotating magnet filament monitor v4 on pin 122.io1.in, enabled'

          jay_s_ukundefined dc42undefined 2 Replies Last reply Reply Quote 0
          • jay_s_ukundefined
            jay_s_uk @selva_tvi
            last edited by

            @selva_tvi sorry, i meant job.layer = 1 not 0.
            They will be activated the rest of the time.
            We could always expand it a bit to only run when the printer is processing.

            if job.layer = 0 & state.status = "processing"
              M591 D0 P0
              M591 D1 P0
            else
              M591 D0 P3 C"121.io1.in" E5 S1 R10:190 ; Filament Runout Sensor for tool 0
              M591 D1 P3 C"122.io1.in" E5 S1 R10:190 ; Filament Runout Sensor for tool 1
            

            Don't forget they need to be indented accordingly

            Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

            1 Reply Last reply Reply Quote 0
            • dc42undefined
              dc42 administrators @selva_tvi
              last edited by

              @selva_tvi I suggest you disable the filament monitor in either the slicer start GCode or in your start.g file. Then enable it either in the slicer layer change script or in daemon.g when the layer number reaches 1 or 2.

              Duet WiFi hardware designer and firmware engineer
              Please do not ask me for Duet support via PM or email, use the forum
              http://www.escher3d.com, https://miscsolutions.wordpress.com

              selva_tviundefined 1 Reply Last reply Reply Quote 0
              • selva_tviundefined
                selva_tvi @dc42
                last edited by

                @dc42 @jay_s_uk Thanks for the support.

                I tried giving M591 D0 P0 at the start and after Layer 2 enabling as M591 D0 P3.

                But that didn't work.

                Then I enabled FRS in config.g as usual, then rewrote daemon.g as below:

                if job.layer = 1 & state.status = "processing"
                M591 D0 S0
                M591 D1 S0
                else
                M591 D0 S1
                M591 D1 S1

                For the first layer, both were disabled and then after 2nd layer it was enabled.

                dc42undefined 1 Reply Last reply Reply Quote 2
                • Phaedruxundefined Phaedrux marked this topic as a question
                • Phaedruxundefined Phaedrux has marked this topic as solved
                • dc42undefined
                  dc42 administrators @selva_tvi
                  last edited by

                  @selva_tvi said in Filament Monitor Disbaled for First layer only:

                  I tried giving M591 D0 P0 at the start and after Layer 2 enabling as M591 D0 P3.

                  That's not what I meant. Configure the filament monitor in config.g as usual. Then use M591 D0 S0 at the start of the job or in start.g to disable it, and M591 D0 S1 at layer 2 to enable it.

                  Duet WiFi hardware designer and firmware engineer
                  Please do not ask me for Duet support via PM or email, use the forum
                  http://www.escher3d.com, https://miscsolutions.wordpress.com

                  selva_tviundefined 1 Reply Last reply Reply Quote 0
                  • selva_tviundefined
                    selva_tvi @dc42
                    last edited by

                    @dc42 Yes, I have configured the FRS as usual in config.g.

                    M591 D0 P3 C"121.io1.in" E5 S1 R10:190 ; Filament Runout Sensor for tool 0
                    M591 D1 P3 C"122.io1.in" E5 S1 R10:190 ; Filament Runout Sensor for tool 1

                    Then in the daemon.g as below:

                    if job.layer = 1 & state.status = "processing"
                    M591 D0 S0
                    M591 D1 S0
                    else
                    M591 D0 S1
                    M591 D1 S1

                    When the print starts, it shows both the FRS is disabled at layer 1.

                    Then from Layer 2, it shows as enabled.

                    By the way, may I know the difference in keeping the above commands in daemon.g vs start.g?

                    Thanks

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

                      @selva_tvi said in Filament Monitor Disbaled for First layer only:

                      By the way, may I know the difference in keeping the above commands in daemon.g vs start.g?

                      start.g will be run once before the print starts so it makes sense to disable your filament sensors there.
                      daemon.g will run by default every 10 seconds, so it's probably using resources needlessly in this case, but it's not going to hurt anything albeit that there's a possible 10 second delay between your layer starting and the sensors beinf enabled.
                      You could use that to enable your sensors or you could just us your slicer's before layer change section.
                      In superslicer or pruser slicer you could use this to only enable the sensors at the start of layer 2

                      {if layer_num == 2}
                      ;enabled filament sensors on layer 2
                      M591 D0 S1 
                      M591 D1 S1
                      {endif}
                      

                      Output in Gcode
                      screen.png

                      selva_tviundefined 1 Reply Last reply Reply Quote 0
                      • selva_tviundefined
                        selva_tvi @OwenD
                        last edited by

                        @OwenD said in Filament Monitor Disbaled for First layer only:

                        start.g will be run once before the print starts so it makes sense to disable your filament sensors there.

                        I disabled daemon.g and kept the below contents in start.g

                        if job.layer = 1 & state.status = "processing"
                        M591 D0 S0
                        M591 D1 S0
                        else
                        M591 D0 S1
                        M591 D1 S1

                        But it didnt work. Even at layer 1, it was enabled only.

                        Any change to be made?

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

                          @selva_tvi said in Filament Monitor Disbaled for First layer only:

                          @OwenD said in Filament Monitor Disbaled for First layer only:

                          start.g will be run once before the print starts so it makes sense to disable your filament sensors there.

                          I disabled daemon.g and kept the below contents in start.g

                          if job.layer = 1 & state.status = "processing"
                          M591 D0 S0
                          M591 D1 S0
                          else
                          M591 D0 S1
                          M591 D1 S1

                          But it didnt work. Even at layer 1, it was enabled only.

                          Any change to be made?

                          start.g is run before printing starts, so the layer number will be zero
                          Therefore your code would enable the sensor as the layer does not equal one.
                          In start.g just disable the sensors without any if conditions.
                          If you use the slicer layer change code I gave then it puts the enabling commands in the print gcode.
                          Otherwise use daemon.g to do the enabling if you can't use the slicer layer change section

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