Navigation

    Duet3D Logo

    Duet3D

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

    Tool Change Macro

    Firmware installation
    4
    8
    1063
    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.
    • blandified
      blandified last edited by

      Hey!

      So when we have a tool change, we want to run a macro which is essentially just an offset between the two extruders (in our case syringes).

      As part of this macro, we need to move our U axis (already set up/defined and we can move it with normal G1 U50 commands and such).

      As a test, we put the following gcode in all the tfree0, tpre0, and tpost0 files:

      G90
      M83
      G1 U50

      To clarify, we put the above gcode into tfree0 and tfree1 and then ran a tool change through the gcode console and it didn't activate the macro. We then put it into tpost0 and tpost1 and tried again, with nothing happening. Etc.

      To explain further, when we upload and try to print the below gcode print file, the tool change does not run the macro that we defined (in this case it only moves the U axis).

      G1 X50
      G1 X-50
      T0
      G1 Y50
      G1 Y-50
      T1
      G1 Z50
      G1 Z-50

      As I understand from @dc42 's explanation here, when the program sees the T0 or T1 commands, a tool change occurs and should run the gcode in the tpre, tpost, and tfree files, but we are unable to accomplish this.

      Any suggestions? Thank you!

      1 Reply Last reply Reply Quote 0
      • timcurtis67
        timcurtis67 last edited by

        Why not put the 50mm offset in with G10 in your configration file?

        Also it doesn't sound like you have the U axis setup to replace the X axis?

        See Link https://duet3d.dozuki.com/Wiki/ConfiguringMultipleIndependentXcarriagesCartesian

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

          Did you home the printer first? Tool change files are not run if the printer has not been homed.

          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

          1 Reply Last reply Reply Quote 0
          • BenDiesel
            BenDiesel last edited by

            Sorry to distal. But now I'm interested in what your printer is and looks like

            1 Reply Last reply Reply Quote 0
            • blandified
              blandified last edited by blandified

              @dc42 We did not home it first. Our printer technically isn't assembled yet so we are trying to do as much as we can before that.

              EDIT:

              edited out 🙂

              1 Reply Last reply Reply Quote 0
              • blandified
                blandified last edited by blandified

                To explain our process for a tool change:

                We have dual extruders (in our case actually syringes) but both extruders are connected by a rack system that works as a see-saw.

                So, when we do a tool change, we need a macro that will (1.) offset distance between the two syringes and (2.) activate the U-axis motor.

                The U-axis motor will be connected to the see-saw/rack system that will rotate to lift one syringe and lower the syringe that will be printing.

                See here: https://imgur.com/a/ZSWwyqb

                The U-axis will rotate one direction to lift one syringe, and then when the other tool change occurs, it needs to rotate the opposite direction to lift the other syringe.

                So...this is just to explain our reasoning.

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

                  You can send G92 X0 Y0 Z0 to pretend that the printer has been homed.

                  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

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

                    @dc42

                    Just an update, you are legitimately and objectively awesome. We got it to work!

                    Just to try to help people in the future who have this same problem, in your config file, make sure to set the axis mins and max, otherwise it won't be able to move in the direction where the mins and max aren't defined.

                    We also set our X axis offset at 50 as a test, but the first print sometimes the X axis won't do the offset, but after redoing the same print file, the X axis offset will work so I think it has to do with the same problem. Will report back with an update

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