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

    Tool Change Routine Help!

    Scheduled Pinned Locked Moved
    CNC
    5
    14
    1.5k
    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.
    • SupraGuyundefined
      SupraGuy
      last edited by

      Well, it's 90% working.

      My Estlcam tool change routine looks like this now:

      ; Send the code to turn off the spindle. It doesn't do anything, but leave it there.
      M05
      ; Send the machine to 30mm about the workspace origin to leave room to change the tool
      G00 X0.0 Y0.0 Z30.0 F2400
      M291 P"Change Tool: <n>" R"Tool Change" S3 Z1
      ;Change tool: <n>
      ; Probe the work, and stop when the Z probe is triggered. (reports the machine position, but I don't care.)
      G30 S-1
      ; Set the work coordinate Z to 0.5mm (the touch plate thickness)
      G10 L20 Z0.5
      ; Lift Z to allow the touch plate to be removed
      G00 Z5 F450
      M291 P"Power on, Tool: <n>" R"Power On" S3
      ; Wait for power on OK
      ; Turn the spindle back on. Well, it would if the Duet had any control over the spindle, which it doesn't
      M03
      

      The problem with this is that it's possible that with a shorter tool in the spindle that I could end up moving outside of the allowable limits of the machine, since it does not reset machine coordinates.

      I think that M585 is the answer to this, but I can't get it to work, as it just tells me "no tool selected"

      Lead screw driven printer, powered by Duet 2 Wifi
      MPCNC powered by Duet 2 Wifi
      CoreXY printer driven by Duet 3 6HC
      LowRider CNC powered by Duet 2 Wifi

      o_lampeundefined jay_s_ukundefined 2 Replies Last reply Reply Quote 0
      • o_lampeundefined
        o_lampe @SupraGuy
        last edited by

        @supraguy said in Tool Change Routine Help!:

        with a shorter tool in the spindle that I could end up moving outside of the allowable limits of the machine,

        I believe those tool commands ignore limits.
        I read through M585 and it seems to do the right thing, when you already 'know' the offset you expect. It doesn't overwrite the offset. You have to do that after the endstop is hit.
        AFAI understand, in RRF3 it can be the regular endstop, no new endstop or Z-probe required.

        SupraGuyundefined 1 Reply Last reply Reply Quote 0
        • Phaedruxundefined
          Phaedrux Moderator @SupraGuy
          last edited by

          @supraguy said in Tool Change Routine Help!:

          The lack of response makes me think that I might not have asked the question well.

          More likely you're in a league of your own.

          Z-Bot CoreXY Build | Thingiverse Profile

          1 Reply Last reply Reply Quote 0
          • jay_s_ukundefined
            jay_s_uk @SupraGuy
            last edited by

            @supraguy probing files are here https://forum.duet3d.com/topic/19698/rrf3-2-request-to-enable-g43-g44-tool-height-offset/3?_=1619983109398

            Typically, the Z homing switch is on the top of the travel for z, that way it homes away from the workpiece.
            My machine has about 95mm of travel from the top to spoilboard and I have my axis limits set as such.
            I then use a probe plate to either set the workplace 0 as the top of the piece to be machined or the spoilboard depending on what I'm doing.

            I need to rewrite my probing procedures now that variables are available but I've not got round to doing this yet.

            Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

            1 Reply Last reply Reply Quote 0
            • SupraGuyundefined
              SupraGuy @o_lampe
              last edited by SupraGuy

              @o_lampe said in Tool Change Routine Help!:

              @supraguy said in Tool Change Routine Help!:

              with a shorter tool in the spindle that I could end up moving outside of the allowable limits of the machine,

              I believe those tool commands ignore limits.

              No what I mean is this:

              Say I define that I want my machine to not be able to move more than 2mm below the "home" position, which I probe to be the top of the spoilboard. I might want to cut into the spoilboard, but never more than 2mm, this is to be sure that I've cut all the way through the work material.

              I start with some features that require removing a lot of material. No problem, this is the tool that I homed with, so it won't cause a problem.

              Then I change to a smaller tool, which also happens to be shorter. I reset the work position to the top of the work, but now, instead of (for example) 12mm above the spoilboard, the machine coordinates say I'm only 8mm above the spoilboard. When I try to plunge down to cut through the piece (ie, moving to Z=-13) the firmware will say that I'm trying to move to machine Z=-5. I've set the axis minima to -2, so the firmware will stop the machine, say that the motion is out of limits, and abort the job.

              Therefore, what I want to do is reset the tool length, so that it knows that the new bit is 4mm shorter when I change it. This way, if I do something dumb with my CAM and tell it to plunge 19mm into a 12mm work piece, the Duet will say "uh, NO!" before it cuts into one of the T nuts built into my spoilboard and ruins the cutting bit.

              @Phaedrux : Oh I hope not. I've always believed that if you're the one that knows the most about what people talk about somewhere, you're in the wrong place. (More commonly, I put it as "If you're the smartest person in the room, you're in the wrong room." but around here, no way I'm the smartest one.) I believe that there are people here who know the answer I'm looking for, but I've probably got terminology entirely wrong.

              @jay_s_uk: Thanks, those are very useful. The tool change script that I am using does reset the workspace to the top of the material (Assuming that I don't remove stuff from the origin until after the final tool change, which tends to suit my work flow, since a cut-out operation is pretty much always last.)

              I suppose that another possibilty for a tool change is to switch to machine coordinates, re-home the machine after a tool change, thereby resetting the machine coordinates, then switch back to the workspace coordinates, which I believe are stored as a set of offsets from the machine coordinates. In order to do this, I'd have to leave the spoilboard top exposed at a homing location, I guess. I'm not sure that I can always do this though, and for large work pieces, that's when I'm most likely to need to change tools.

              I'm going to need to look up those meta commands, to see what is available.

              Lead screw driven printer, powered by Duet 2 Wifi
              MPCNC powered by Duet 2 Wifi
              CoreXY printer driven by Duet 3 6HC
              LowRider CNC powered by Duet 2 Wifi

              o_lampeundefined jay_s_ukundefined 2 Replies Last reply Reply Quote 0
              • o_lampeundefined
                o_lampe @SupraGuy
                last edited by

                @supraguy
                I think there is only one save way to try out a new workflow:
                Do some dummy stuff with tool 1, change it to shorter tool2; rehome Z and remove tool2 afterwards. Then do some work with the new coords and see what happens...

                1 Reply Last reply Reply Quote 0
                • jay_s_ukundefined
                  jay_s_uk @SupraGuy
                  last edited by

                  @supraguy that's why you should home at max, not at the spoilboard

                  Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

                  o_lampeundefined SupraGuyundefined 2 Replies Last reply Reply Quote 0
                  • o_lampeundefined
                    o_lampe @jay_s_uk
                    last edited by

                    @jay_s_uk said in Tool Change Routine Help!:

                    @supraguy that's why you should home at max, not at the spoilboard

                    That doesn't help with different tool lenght's ? Or did I get you wrong?

                    jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                    • jay_s_ukundefined
                      jay_s_uk @o_lampe
                      last edited by

                      @o_lampe you home at the top with maximum travel. Your maximum height is set so you can plunge as deep as your spindle will allow.
                      Your height is then always the same, your spoilboard is then always in the same place. You can then use the touchplate to calculate tool length, easily allowing different tools to be used. As soon as you start messing with the homed length you might as well not bother

                      Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

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

                        @supraguy I think I see the problem. You need two Z min limits. One is for the motion mechanics and apples even if no tool is loaded. The second depends on the tool Z offset and is to stop the tool tip going too low.

                        M208 commands currently support the following format to specify both minimum and maximum limits:

                        M208 Z-1:200

                        I was already considering supporting a third optional value, which would be the position when the homing switch is triggered, useful if that is different from both the minimum and maximum limits. I could add additional parameters to allow setting of limits relative to the tool tip, on the assumption that you specify the tool tip offset using G10 when you change 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
                        • SupraGuyundefined
                          SupraGuy @jay_s_uk
                          last edited by

                          @jay_s_uk Where homing at the top makes sure that I remain within the limits of the machine, it won't keep be from plunging into the T nuts in the spoilboard. Since there is a variety of lengths that the tools could be. I recognize that this makes sense from the machine point of view, and this is the way that the machine currently on the drawing board is going to operate, but I'd have liked to be able to use the firmware axis limits as a safety/sanity check.

                          @dc42 I'm not sure that it would help. The problem with swapping bits in a router is that the amount of bit sticking out from the collet is different every time I change it, and in fact the router position within the gantry has a certain amount of variability as well, so if I take the router out of the clamp to clean or service it and put it back in, even the collet is in a different position relative to the machine limits. I'm not sure that I want to spend time chasing the machine limits every time I change a bit or service the router.

                          I believe that in general use, it's safe to say that I am not running any jobs, certainly not creating any jobs that are pushing the envelope of the motion limits of my machine. While homing the tool to the spoilboard isn't optimal, it provided a way (or so I hoped) to use the axis limitations of the machine to give me a convenient way to do a sanity check on my CAM work.

                          I will get the same end results (or close enough) to homing hte machine at the top and seting axis limits to the machine motion limits if I simply allow the axis limits of the machine to plunge into the spoilboard approximately as much as the most commonly used tool length, which will (most probably) keep the router collet off of the spoilboard, and depend on reasonable CAM to keep from damaging a bit, or T nut. I can actually safely lift the Z axis well beyond its usable range. The bearings on the Z axis slide will lose contact, but they will just contact again as I lower it.

                          20210501_043727.jpg

                          Anyway, this is the first project I completed with the Duet connected to the CNC. It's carved from a piece of 3/4" pine, and houses my PanelDue 5i

                          Lead screw driven printer, powered by Duet 2 Wifi
                          MPCNC powered by Duet 2 Wifi
                          CoreXY printer driven by Duet 3 6HC
                          LowRider CNC powered by Duet 2 Wifi

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