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

M109 command does not run tool change macro's

Scheduled Pinned Locked Moved
General Discussion
5
17
886
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
    dc42 administrators @dc42
    last edited by 15 Apr 2019, 13:59

    I confirm there is a problem, at least in the case where no tool is selected initially.

    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
    • undefined
      NicoLab28
      last edited by 15 Apr 2019, 15:40

      take a look to this thread

      https://forum.duet3d.com/topic/9405/first-t0-in-gcode-does-not-work

      undefined 1 Reply Last reply 15 Apr 2019, 15:51 Reply Quote 0
      • undefined
        dc42 administrators @NicoLab28
        last edited by 15 Apr 2019, 15:51

        @nicolab28 said in M109 command does not run tool change macro's:

        take a look to this thread

        https://forum.duet3d.com/topic/9405/first-t0-in-gcode-does-not-work

        That looks like the same issue. There is a M109 S225 T0 command in the GCode file, before the T0 command.

        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
        • undefined
          St Taw
          last edited by 15 Apr 2019, 16:20

          Note sure if associated or a different issue but if I Pause and then Cancel a print from Panel Due the tool becomes deselected but no macro run. Hence the tool remains attached to the head.

          1 Reply Last reply Reply Quote 0
          • undefined
            clegg78
            last edited by clegg78 15 Apr 2019, 16:33

            @dc42 said in M109 command does not run tool change macro's:

            f all axes are flagged as having been homed, then the tfree file for the current tool should be run (if a tool is already selected), followed by the tpre and tpost files for tool 3.

            Ha, happy I found this, I was just finding this same issue when troubleshooting a related odd tool selection behavior of M109.

            Simplify runs the HE heat up sequence before the custom scripts can be run, so I see this :

            "M104 S255 T1
            M109 S255 T1"

            And if no tool has been called yet, M109 seems to set Tool 1 (from no tool being selected - this is a problem in its own right, as I cant run the tool Tfree and tPost that I was planning on at the start of a print to ensure everything is where it should be. This is before the axis have been homed.

            But I noticed that even if I manually tweaked the script so that the weird M109 tool selection behavior happened after G28, I wouldn't get the scripts to fire.

            Any reason M109 picks a Tool when M104 does not? In S3D's case, it means I cant actually run any of the tool change scripts before printing starts without throwing in a tool switch back and forth which seems kind of clumsy.

            A geek designing and building his own custom IDEX printer from scratch as seen here: https://joekelly.co/3d/

            1 Reply Last reply Reply Quote 0
            • undefined
              dc42 administrators
              last edited by 16 Apr 2019, 08:04

              The reason M109 does a tool change is that most slicers assume that a tool is already selected at the start of a print. There used to be many users reporting prints failing, which was because no tool was ever selected. As M109 waits for heating to complete, it's unlikely that you will use it unless you are about to use that tool. Also a slicer that is aware that it is generating code for RepRapFirmware should be using G10 (or possibly M104) and then M116, not M109. So we take the view that any GCode that includes M109 probably doesn't select a tool before it prints, which is why we make tool selection implicit when the firmware sees M109.

              M104 is used by some slicers to set the temperatures of standby tools, so I didn't consider it appropriate to make it select a 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

              1 Reply Last reply Reply Quote 0
              • undefined
                St Taw
                last edited by 16 Apr 2019, 15:05

                Thanks for reply.

                Does anyone use Slic3r PE for an E3D like tool changer that works without having to edit the gcode file to overcome this issue of no tool being got?
                The Firmware setting in Slic3r I have set to RepRap/Sprinter. Would one of the other 'Flavors' be better to generate G10 commands?

                Any E3D toolchange users out there that are using Slic3r? If so how do you get the tool to be physically picked up on print run if currently physically no tool selected and firmware starts with no tool selected.

                undefined 1 Reply Last reply 17 Apr 2019, 08:31 Reply Quote 0
                • undefined
                  Phaedrux Moderator
                  last edited by 16 Apr 2019, 16:41

                  You may have to use the slicer post processing capabilities to convert the M109 to G10.

                  Z-Bot CoreXY Build | Thingiverse Profile

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    dc42 administrators @St Taw
                    last edited by dc42 17 Apr 2019, 08:31

                    @st-taw said in M109 command does not run tool change macro's:

                    Thanks for reply.

                    Does anyone use Slic3r PE for an E3D like tool changer that works without having to edit the gcode file to overcome this issue of no tool being got?
                    The Firmware setting in Slic3r I have set to RepRap/Sprinter. Would one of the other 'Flavors' be better to generate G10 commands?

                    Any E3D toolchange users out there that are using Slic3r? If so how do you get the tool to be physically picked up on print run if currently physically no tool selected and firmware starts with no tool selected.

                    Have you tried putting a T0 command in the start.g file?

                    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
                    • undefined
                      St Taw
                      last edited by 17 Apr 2019, 17:32

                      I tried putting a T0 command in start.g

                      It appears to run the tfree0.g macro then the T3 tpre3.g and tpost3.g.

                      The head does go to put T0 back in place at the start of printing even though it does not have the tool in place is a small compromise to get it working.

                      On a similar note I have
                      M0 in the Cancel.g which also deselects the tool without running the tfree?.g macro. I have resolved this by putting a T-1 before it.

                      Is there any documentation which describes which commands select and deselect tools without running there respective free, pre and post macro's?

                      undefined 1 Reply Last reply 17 Apr 2019, 17:48 Reply Quote 0
                      • undefined
                        dc42 administrators @St Taw
                        last edited by 17 Apr 2019, 17:48

                        @st-taw said in M109 command does not run tool change macro's:

                        On a similar note I have
                        M0 in the Cancel.g which also deselects the tool without running the tfree?.g macro. I have resolved this by putting a T-1 before it.

                        I will investigate this. Note, you can define what M0 does by creating a stop.g file.

                        Is there any documentation which describes which commands select and deselect tools without running there respective free, pre and post macro's?

                        The intention is that the tool change macros are always run, unless one of the following is true:

                        1. One or more axes are flagged as not having been homed;
                        2. You use the T command with a P parameter to specify that you do not want some of the tool change files to be run.

                        In any other situation, not running tool change files on a tool change is a bug.

                        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
                        16 out of 17
                        • First post
                          16/17
                          Last post
                        Unless otherwise noted, all forum content is licensed under CC-BY-SA