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

Parameters on toolchange

Scheduled Pinned Locked Moved
Gcode meta commands
3
5
199
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
    benecito
    last edited by 27 Nov 2024, 14:03

    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.

    undefined 1 Reply Last reply 27 Nov 2024, 14:17 Reply Quote 0
    • undefined
      droftarts administrators @benecito
      last edited by 27 Nov 2024, 14:17

      @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

      undefined 1 Reply Last reply 27 Nov 2024, 14:23 Reply Quote 0
      • undefined
        benecito @droftarts
        last edited by 27 Nov 2024, 14:23

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

        undefined 1 Reply Last reply 28 Nov 2024, 15:24 Reply Quote 0
        • undefined
          dc42 administrators @benecito
          last edited by 28 Nov 2024, 15:24

          @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

          undefined 1 Reply Last reply 29 Nov 2024, 09:21 Reply Quote 0
          • undefined
            benecito @dc42
            last edited by 29 Nov 2024, 09:21

            @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
            • undefined benecito referenced this topic 29 Nov 2024, 09:24
            1 out of 5
            • First post
              1/5
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA