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

    Multi Tool - Tool Change - Lower bed by 5mm relative to current z posi

    Scheduled Pinned Locked Moved
    General Discussion
    4
    15
    1.7k
    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.
    • andyvirusundefined
      andyvirus
      last edited by

      Thanks for your help so far!

      But if i put a G90 at then end of the macro for absolute positioning, when the next part of the layer prints will it not be 4mm too high as we have now stated that the previous position is now 4mm lower (nozzle higher)?

      1 Reply Last reply Reply Quote 0
      • andyvirusundefined
        andyvirus
        last edited by

        I may have found something:

        "RepRapFirmware provides an additional 'R1' parameter to tell the machine to go back to the coordinates a print was previously paused at. If this parameter is used and the code contains axis letters, an offset will be added to the pause coordinates (e.g. G1 R1 Z5)."

        That looks like what i want to do. Just need to figure out what constitutes as a pause.

        1 Reply Last reply Reply Quote 0
        • deckingmanundefined
          deckingman
          last edited by

          @andyvirus:

          Thanks for your help so far!

          But if i put a G90 at then end of the macro for absolute positioning, when the next part of the layer prints will it not be 4mm too high as we have now stated that the previous position is now 4mm lower (nozzle higher)?

          Yes, I was thinking along the lines that you would of course run two macros. The first would lift the nozzle, the second would drop it back down again. The code would be exactly the same except that you would have Z-4 (minus 4) in the second macro. You could put the whole thing in a single macro. i.e. lift the nozzle, do what you need to do, then drop the nozzle back to where it was. In which case, depending on what happens between the two sets of commands, you could set to relative mode at the beginning then only put it back to absolute at the end.

          Edit. If you use pause, you'll not likely be able to move the head while the machine is paused.

          Ian
          https://somei3deas.wordpress.com/
          https://www.youtube.com/@deckingman

          1 Reply Last reply Reply Quote 0
          • andyvirusundefined
            andyvirus
            last edited by

            Thanks for your help.

            I just cant see how you run a command or a macro after a print has started for that layer. I know how as tool changes or even in scripts. i just don't know how you do it for constantly changing locations during a print not prior to it.

            Im just not getting it or im not explaining what i need.

            Thanks again

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

              There is partially-implemented code in firmware 1.18 to automatically set a restore position at the start of a tool change and then go to it when you execute G1 R2. So you could do G91/G1 Z4 in your tfree#.g and/or tpre#.g file, then use G1 R2 Z4/G1 R2 at the end of tpost#.g. However, this won't work on an IDEX machine because X axis mapping is not yet implemented in the save/restore position mechanism.

              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
              • andyvirusundefined
                andyvirus
                last edited by

                ok, thanks dc42.

                Its not that i want to return to the same point, I have no idea what the next point will be for the next tool (with out looking at the gcode). The next position for Tool 1 or 2 is determined by the object being printed.

                Short of editing the GCODE, finding where the start of each layer/tool is, finding the first absolut position and just before that adding G1 Z{what ever the next line Z position is + 5mm} i do not know what else i can do. I will have to just allow the nozel to drag o the last layer i guess as either i am too dense to understand the options, i cant explain myself or its not possible. All things i cant fix. Apologies if i that comes across badly, im just pulling my hair out trying to think of a way to explain this issue.

                Its so simple in a single colour print as you put it in the start script to lower the bed 5mm, then the absolute position of the object GCODE is sent the X and Y is moved THEN the Z to 0.18 or what ever the first layer is. Done. I would like/need the same behaviour for every layer for every tool for any position that the objects GCODE file determines as the first G1 for that layer/tool layer.

                Thankyou for all your help, im going to find beer this has stressed me out so much for some reason…

                1 Reply Last reply Reply Quote 0
                • deckingmanundefined
                  deckingman
                  last edited by

                  I'm not sure now that understand what your problem is. Tool change macros run whenever a new tool is selected or an old one is finished with, regardless of where or when you are in the print. So when the Duet sees a "T" command in the gcode file, a macro (if it exists) gets executed.

                  Ian
                  https://somei3deas.wordpress.com/
                  https://www.youtube.com/@deckingman

                  1 Reply Last reply Reply Quote 0
                  • T3P3Tonyundefined
                    T3P3Tony administrators
                    last edited by

                    Hi Andy, i absolutely get what you are saying. You effectively need a command to execute a move precisely before the next line of gcode after all the tool change macros have completed. This is because even if the G1 R2 command worked to return to the point where the tool change was triggered, that might not be the start point for the next tool, so the hotend would be dragged across the print to the new tool start point.

                    At this stage such functionality does not exist in the firmware. I use the slicer to do this as on the BigBox IDEX i have. I am in two minds as to whether to recommend adding it because of the complexity of looking ahead to future moves and changing behaviour based on that.

                    www.duet3d.com

                    1 Reply Last reply Reply Quote 0
                    • andyvirusundefined
                      andyvirus
                      last edited by

                      Hi T3P3Tony, thats exactly right. What do you do in the slicer currently to avoid this?

                      1 Reply Last reply Reply Quote 0
                      • andyvirusundefined
                        andyvirus
                        last edited by

                        OK so I think Deckingman had it spot on. I was making an assumption on what G90 did which was incorrect. I thought issuing a G91 them moving z by 5mm then G90 would effectively make Z1.0 (if that is what Z was prior to the G91) Z6.0… dont ask me why, stress can be a blessing and a curse... today a curse.

                        I think
                        G91
                        G1 Z5 F180
                        G90

                        in the tool change script or macro will do the job. I think the movements of X, Y and Z are not all at the same time, i think Z is done last so that works. If they do move all at the same time then i need to make the G1 Znnn value large enough to ensure it reaches the correct spot (race) before Z comes up to the nozzle....

                        Is this how your doing it T3P3Tony?

                        1 Reply Last reply Reply Quote 0
                        • T3P3Tonyundefined
                          T3P3Tony administrators
                          last edited by

                          Andy - It was how I was doing it, but as I wrote earlier the issue is that the tool change scripts are executed and then the next movement command for the new tool, which inevitably is some distance away.

                          What I ended up doing was used "Z hop" in the slicer (0.2mm worked fine for me) which raised the ehozzle by just enough to clear everything whenever there is a travel move, and also happens on a tool change.

                          Edited to add that all movement in a G1 command is executed to synchronise over the move. If you want XY, then Z, use two G1 commands.

                          www.duet3d.com

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