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

Tool changer commands

Scheduled Pinned Locked Moved
Tuning and tweaking
5
32
5.1k
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
    RajaaKahel
    last edited by RajaaKahel 21 Aug 2018, 16:06

    Hi! please I need some help with the new tool changer printer I made (I setup four macros that are ready for use).

    How can I do the following please?

    Starting Script (when print job is started)

    if new tool is T0 then call M98 P/macros/selectT0

    if new tool is T1 then call M98 P/macros/selectT1

    Tool Change Script (during print job)

    {if new tool is T0 then call M98 P/macros/parkT1

    if new tool is T0 then call M98 P/macros/selectT0

    if new tool is T1 then call M98 P/macros/parkT0

    if new tool is T1 then call M98 P/macros/selectT1

    Ending Script (after print job is finished)

    if current tool is T0 then call M98 P/macros/parkT0

    if current tool is T1 then call M98 P/macros/parkT1

    It's very important for me in order to make my tool changer work automatically.
    Hopefully you can be clear and easy with me so I understand exactly how and where to put everything.
    Thank you very much in advance!

    undefined 1 Reply Last reply 21 Aug 2018, 17:43 Reply Quote 0
    • undefined
      whosrdaddy
      last edited by 21 Aug 2018, 16:49

      Did you read the "Tool change" section in the documentation?

      undefined 1 Reply Last reply 21 Aug 2018, 17:13 Reply Quote 0
      • undefined
        RajaaKahel @whosrdaddy
        last edited by 21 Aug 2018, 17:13

        @whosrdaddy
        Thanks, yes I've read them but they got me very confused unfortunately.
        Also seems that I can use them "during the print" but I also need separate sections for "starting a print" and "ending a print".
        So for example: when the print starts; the firmware selects the correct tool (without parking anything because everything is already parked at the end of the previous print).
        But during a print the firmware should park the current tool then select the new one.

        1 Reply Last reply Reply Quote 0
        • undefined
          whosrdaddy
          last edited by 21 Aug 2018, 17:19

          the slicer will call the Tx commands and subsequently the firmware will call the 3 tool related macro's.
          I don't see the problem?

          undefined 1 Reply Last reply 21 Aug 2018, 17:57 Reply Quote 0
          • undefined
            T3P3Tony administrators @RajaaKahel
            last edited by 21 Aug 2018, 17:43

            @rajaakahel

            Put the selectT0 or selectT1 in your start gcode, the parkT0/T1 in the end gcode then use the tool change macros (pre, post etc) to call the relavent park and selects on tool change.

            www.duet3d.com

            1 Reply Last reply Reply Quote 0
            • undefined
              RajaaKahel @whosrdaddy
              last edited by 21 Aug 2018, 17:57

              @whosrdaddy
              If I write in tpre0 to park T1 then select T0 during a print that's ok. But then at the beginning of a print it will also do the same (to park T1 then select T0) but T1 is already parked, That will be horrible crash.
              As I said I'm pretty confused, so please if you can't explain with simple steps don't confuse me more 🙂
              Thanks for the input 🙂

              1 Reply Last reply Reply Quote 0
              • undefined
                whosrdaddy
                last edited by 21 Aug 2018, 18:00

                Actually parking T1 should be done in TFree1.g, don't touch other tools in the Txxxx Macro's

                1 Reply Last reply Reply Quote 0
                • undefined
                  T3P3Tony administrators
                  last edited by 21 Aug 2018, 18:03

                  @RajaaKahel the Duet does not know that a particular T0 command is at the start of a print, or part way through a print, which is why i am suggesting having the appropraite pick up command in your start gcode as included in the slicer.

                  Alternatively always have the printer have T0 picked up when its in an idle state.

                  www.duet3d.com

                  undefined 1 Reply Last reply 21 Aug 2018, 18:08 Reply Quote 0
                  • undefined
                    RajaaKahel @T3P3Tony
                    last edited by 21 Aug 2018, 18:08

                    @t3p3tony and @whosrdaddy
                    Thank you for your input! I'll try to figure this out with a new cup of coffee 🙂

                    undefined 1 Reply Last reply 21 Aug 2018, 18:13 Reply Quote 0
                    • undefined
                      whosrdaddy @RajaaKahel
                      last edited by 21 Aug 2018, 18:13

                      @rajaakahel : I don't know if you read this one too: https://duet3d.dozuki.com/Wiki/Gcode#Section_T_Select_Tool?
                      This is the most informative doc about tools and the sequence followed on tool changes.

                      undefined 1 Reply Last reply 21 Aug 2018, 21:14 Reply Quote 0
                      • undefined
                        RajaaKahel @whosrdaddy
                        last edited by 21 Aug 2018, 21:14

                        @whosrdaddy
                        Thank you, I started to make progress finally, after some painful crashes especially with the interference from S3D..

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          RajaaKahel
                          last edited by 22 Aug 2018, 14:09

                          Ok, so I removed any parking or picking commands from Simplify3D, and did the following:
                          ; tfree0.g
                          ; called when tool 0 is freed
                          M98 P/macros/parkT0

                          ; tfree1.g
                          ; called when tool 1 is freed
                          M98 P/macros/parkT1

                          ; tpre0.g
                          ; called before tool 0 is selected
                          M98 P/macros/selectT0

                          ; tpre1.g
                          ; called before tool 1 is selected
                          M98 P/macros/selectT1

                          It works fine during a print, but at the beginning it doesn't pick any tool, and at the end it doesn't park any tool. Is there a way to fix this?
                          I noticed that I don't have files such as start.g or end.g in the files section, anyway is there such a start file for T0 and another one for T1? (same for the end?)

                          undefined undefined 2 Replies Last reply 22 Aug 2018, 14:39 Reply Quote 0
                          • undefined
                            T3P3Tony administrators @RajaaKahel
                            last edited by 22 Aug 2018, 14:39

                            @rajaakahel glad you got it working on tool change!

                            start and end gcodes are normally configured in you slicer so you can add the relevant macro calls to your slicer.

                            One thing I note it that if you don't always start with tool 0 for every print then its probably better to have the "default state " of your printer with the tool changer with tool 1 selected.

                            www.duet3d.com

                            undefined 1 Reply Last reply 22 Aug 2018, 15:24 Reply Quote 0
                            • undefined
                              RajaaKahel @T3P3Tony
                              last edited by 22 Aug 2018, 15:24

                              @t3p3tony Thank you!
                              Unfortunately Starting Script and Ending Script in Simplify3D don't allow IF commands such as {IF NEWTOOL=0}
                              It's only allowed in Tool Change Script section.
                              And as you know each print is different, one time you start with a tool and another time you start with another tool (same for finishing). So I would love to make it automatic..

                              undefined 1 Reply Last reply 22 Aug 2018, 16:57 Reply Quote 0
                              • undefined
                                T3P3Tony administrators @RajaaKahel
                                last edited by 22 Aug 2018, 16:57

                                @rajaakahel in that case you are going to have to have a default state of the printer with always having T0 (or T1) selected. So your end script always selects T0 so you know at the start that T0 is selected. That way when the printer changes to T1 it will park T0 and then pickup T1. That should work even if the printer start with T1, as long as S3d explicitly chooses the tool every time.

                                www.duet3d.com

                                undefined 1 Reply Last reply 22 Aug 2018, 18:05 Reply Quote 0
                                • undefined
                                  RajaaKahel @T3P3Tony
                                  last edited by RajaaKahel 22 Aug 2018, 18:05

                                  @t3p3tony Thank you very much for your time! I'll look into this closely. I also submitted a request to S3D to allow IF commands in start and end scripts. I hope it can be added later in the Duet firmware as well.
                                  Please can you check my other post whenever you have time?
                                  https://forum.duet3d.com/topic/6517/setting-z-offset-for-t1

                                  1 Reply Last reply Reply Quote 0
                                  • undefined
                                    dc42 administrators @RajaaKahel
                                    last edited by 22 Aug 2018, 20:34

                                    @rajaakahel, make sure you start with no tool selected. You probably have T0 at the end of config.g, if so then remove that. Also include T-1 in your slicer end script to deselect and park the active tool.

                                    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 2 Replies Last reply 23 Aug 2018, 18:50 Reply Quote 0
                                    • undefined
                                      RajaaKahel @dc42
                                      last edited by 23 Aug 2018, 18:50

                                      @dc42 Thank you! I'm still trying to work it out to be full automatic. Will get back to you with the results 🙂

                                      1 Reply Last reply Reply Quote 0
                                      • undefined
                                        RajaaKahel @dc42
                                        last edited by 24 Aug 2018, 07:43

                                        @dc42 Hello again, I managed to
                                        park any nozzle at the end of a print by putting the following Ending Script in my slicer:

                                        G1 E-15 F4000
                                        M104 S0 ; turn off extruder
                                        M140 S0 ; turn off bed
                                        T0
                                        M98 P/macros/parkT0
                                        G28 X ; home x and y axes
                                        G28 Y ; home x and y axes
                                        M84 ; disable motors
                                        M107
                                        M1

                                        In Duet firmware I have the following:

                                        ; tfree0.g
                                        ; called when tool 0 is freed
                                        M98 P/macros/parkT0

                                        ; tfree1.g
                                        ; called when tool 1 is freed
                                        M98 P/macros/parkT1

                                        ; tpost0.g
                                        ; called after tool 0 is selected
                                        M98 P/macros/selectT0

                                        ; tpost1.g
                                        ; called after tool 1 is selected
                                        M98 P/macros/selectT1

                                        But the problem is when I start a print, Duet is always activating T0 (even if the first tool to run is T1) when starting to heat up, but it does not actually go and pick T0 tool (so it thinks T0 is already picked up).

                                        I can work this around by picking T0 at the end of each print without parking it. But I want both nozzles to be parked to prevent oozing and stuff.

                                        So the question is: how can I tell the duet to start a print (heat up) without activating any tool until the print gcode tells it to activate (thus pick up) the right tool?

                                        *I don't have T0 or T1 at the end of config.g
                                        *I tried to include T-1 or M1 at the Starting Script of my slicer, but it didn't work. (Duet is always activating T0 regardless of what tool gonna start).
                                        *I tried sending M1 manually before I start a print (to deactivate tools) but same thing happens when a print is started by heating up (activating T0).

                                        undefined undefined 2 Replies Last reply 24 Aug 2018, 10:15 Reply Quote 0
                                        • undefined
                                          zerspaner_gerd @RajaaKahel
                                          last edited by zerspaner_gerd 24 Aug 2018, 10:15

                                          @rajaakahel Make sure that all axes are referenced before the tool command!
                                          Only then will the tool script be triggered!

                                          @rajaakahel said in Tool changer commands:

                                          But the problem is when I start a print, Duet is always activating T0 (even if the first tool to run is T1) when starting to heat up, but it does not actually go and pick T0 tool (so it thinks T0 is already picked up).

                                          Do you have a start.g file? With me the duet does not select a tool at the print start, so you have somewhere a tool command.

                                          @rajaakahel said in Tool changer commands:

                                          I can work this around by picking T0 at the end of each print without parking it. But I want both nozzles to be parked to prevent oozing and stuff.

                                          Does not T-1 work? There must be no M84, M18, M1 before.

                                          G1 E-15 F4000
                                          M104 S0; Extruder
                                          M140 S0 ausschalten; Bett ausschalten
                                          T-1
                                          G28 X; home x und y Achsen
                                          G28 Y; home x und y Achsen
                                          M84; Deaktivieren Sie die Motoren
                                          M107
                                          M1

                                          @rajaakahel said in Tool changer commands:

                                          So the question is: how can I tell the duet to start a print (heat up) without activating any tool until the print gcode tells it to activate (thus pick up) the right tool?

                                          You can activate tools with T# P0 (# = Tool Number) without changing the tool

                                          https://duet3d.dozuki.com/Wiki/Multiple_tools_and_Tool_change_macros

                                          Board: Duet WiFi 1.03 | Firmware Version: 3.1.1 | WiFi Server Version: 1.23 | Web Interface Version: 3.1.1

                                          undefined 1 Reply Last reply 24 Aug 2018, 14:18 Reply Quote 0
                                          10 out of 32
                                          • First post
                                            10/32
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA