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

    Parameters on toolchange

    Scheduled Pinned Locked Moved
    Gcode meta commands
    3
    5
    334
    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.
    • benecitoundefined
      benecito
      last edited by

      Hello everyone,

      I'm trying to optimize the tool change and would like to make calling the clean and/or purge macros optional.
      For the macros themselves this is easy to do with a parameter in the M98 P"0:/sys/purge0.g" call.

      But for the tool change called by T0 / T1 I did not manage to pass a parameter. Is there a way I am not seeing?

      thanks for any hints and/or ideas.

      droftartsundefined 1 Reply Last reply Reply Quote 0
      • droftartsundefined
        droftarts administrators @benecito
        last edited by

        @benecito You could set a global variable, and check that on tool change. See https://docs.duet3d.com/en/User_manual/Reference/Gcode_meta_commands#variables and https://docs.duet3d.com/en/User_manual/Reference/Gcode_meta_commands#variables-1 for global variable usage.

        Ian

        Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

        benecitoundefined 1 Reply Last reply Reply Quote 0
        • benecitoundefined
          benecito @droftarts
          last edited by

          @droftarts Thanks!
          It's an option yes, but quite a complicated one. If I have i.e. the purge option turned on for a print, but while preparing everything call the purge1 macro it will purge once because of the tool change and once because of the macro call. Not really elegant. Changing the global variable before calling the macro would be possible, but also not really elegant as there are quite a few occasions this would need to be done and another variable to store the state to switch back to afterwards would be needed.

          Any other ideas?

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

            @benecito you could raise a feature request to allow parameters provided with the T command other than P to be passed through to the tool change files.

            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

            benecitoundefined 1 Reply Last reply Reply Quote 0
            • benecitoundefined
              benecito @dc42
              last edited by

              @dc42 I was hoping there would already be a way to do so. But thanks! I will create one.

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