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

    A macro to Enable/Disable Filament sensor during print ?

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    4
    5
    338
    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.
    • Zoltan3Dundefined
      Zoltan3D
      last edited by

      Hello,

      I recently added a Biqu filament sensor that I have in stock since they sent it to me to beta test 😛
      It's a pulsing sensor, so can detect filament runout and clog or tangle
      It work with M591 D0 P7 C"121.io1.in" L7 R80:120 E15 S1

      It works perfectly, but sometimes it give fake error with soft TPU, because the TPU extend 😛

      I know I can change the R value to bigger spacing value.

      But I really want to find a way to make one Enable and one Disable Macro for enable or disable sensor while printing
      And if possible with some visual tip in the menu like a green dot or something to show if it's enabled or disabled .

      Someone more familiar with macros can help me with this please ?

      PS : also, is it possible to make a different Pause routine for filament runout than a normal Pause ?
      Because it can be useful tu Up the Z height automaticly when in runout

      Thanks a lot

      moth4017undefined OwenDundefined 2 Replies Last reply Reply Quote 0
      • moth4017undefined
        moth4017 @Zoltan3D
        last edited by

        @Zoltan3D you should beable to put this in a macro to turn it off

        M591 D0 S0 ;D = extruder number S0 =off

        <

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

          @Zoltan3D said in A macro to Enable/Disable Filament sensor during print ?:

          Hello,

          PS : also, is it possible to make a different Pause routine for filament runout than a normal Pause ?
          Because it can be useful tu Up the Z height automaticly when in runout

          In your pause.g you can use the object model to check the status of the filament sensor and do a Z move if required
          It would be something like this untested code

          if sensors.filamentMonitors[0].status !="ok"
             G91 ; change to relative moves
             G1 Z20 ; raise head 20mm 
             G90 ; change to absolute 
          
          1 Reply Last reply Reply Quote 0
          • mikeabuilderundefined
            mikeabuilder
            last edited by

            There are a lot of things you can easily do with macros you write and with "standard" macros.

            For example, In the Filaments folder you will find a sub-folder for each filament type. And in that folder, there is a file called config.g. This file (aka macro) is run when the filament is changed using DWC. You could put code in this file for your TPU filament to disable your filament sensor. You could have code in your other filament directories to turn on the filament sensor. This page is good to read: https://docs.duet3d.com/en/User_manual/Reference/DWC_filaments

            You could also add a LED to a Duet board output and have it turn on or off with the filament sensor. Or you could have a message displayed when the filament sensor is turned off or on to alert the user. That's an M291 command.

            Writing macros is not too difficult, and is even fun for some of us. Read up on the capabilities of macros here: https://docs.duet3d.com/en/User_manual/Reference/Gcode_meta_commands

            1 Reply Last reply Reply Quote 0
            • Zoltan3Dundefined
              Zoltan3D @moth4017
              last edited by

              @moth4017 thanks guys for your help,

              So in fact, macros are just normal config commands, but are temporary

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