Probing X, Y, and Z for CNC job with tool changes

  • I am relatively new to the CNC community, I build a Duet Wifi control system to run on an openbuilds CBeam hardware platform. I have limit switches only on the homing side of each axis.

    I am having trouble understanding the work flow to setup a job. I am thinking that this should be the sequence in setting up a new job but would appreciate a little help understanding

    • Setup 3 tools in Fusion 360 CAM and use them all, 1 for each cam setup.

    • Manually Probe X, and Y of the workpiece front left corner and set the G54 o,o position to these probed coordinates.(I am thinking to set the probe position at the corner of the workpiece and CNC the probing. Not sure what probe system to use)

    • Probe Z(I think on the bed since I will have to do manual tool changes during the job.)

    • After first operation, have the machine move to a location where I can change the tool with the motors locked.

    • Change the tool. acknowledge the change, and have the tool automatically set the z 0 position and create the proper offsets so it is relative to the first tool.

    I have searched alot and have not really found anything.

    I recommended workflow with suggestions for gcodes and probing harware would be so helpful if someone would be gracious enough to guide me.



  • You are very close. Workflow:

    • Setup CAM for multi tools, just as you said. It will generate T0, T1, etc into the gcode. Be sure that Z0 is "top of stock". This is a little counter-intuitive in F360 "manufacturing" space, so check the results carefully.

    • Power on machine, home machine to limit switches. You are now "zeroed" in "machine coordinate system" aka G53

    • Clamp or fasten stock. Install first tool and jog to corner of stock in XY. Depending on how critical this is, you may want to eyeball it, or use an edge finder, or whatever. Important: do not worry about Z, yet we are just doing XY. (and, if the words "edge finder" or "wiggler" mean nothing, let's talk about that separately, later)

    • Zero X and Y in the first or second "Work Coordinate System" (G54 or G55). This is where the Duet web interface doesn't help... there is no button for this. I prefer using the second (G55) system. Therefore, I'd enter G10 L20 P2 X0Y0
      G10 - the command
      L20 - we are going to offset (not absolute) a work coordinate system
      P2 - the second work coordinate system (they start at G54, so the second one is G55)
      X0Y0 - no offset from where the tool is right now.

    • That's it for XY. Now we deal with Z.

    • I normally probe for Z. This involves a ground wire to the spindle, and assumes a conductive tool. Steel and carbide both are conductive. You also need a "movable plate", generally made from 1/8 aluminum, wired to an endstop input that is not otherwise in use.

    • Jog the tip of the tool above the stock, somewhere away from edges. Set the movable plate under the tool. Probe. The tool will descend until it touches the plate. The macro that does this probe should contain the thickness of the plate. By setting Z0 = current position (when it touches the plate ) - that thickness, Z0 now matches top-of-stock. Again, the DWC GUI doesn't help you, there is no button for this. Write a macro.

    • Jog away a little bit and remove the movable plate and get ready to cut.

    • Enter G55 (so the machine operates in the coordinate system we just offset to the stock) and start your job.

    That sounds like a LOT... but the summary is: Use the tip of the bit to offset XYZ to the actual stock, set to those offsets, cut.

    Tool CHANGES are quite similar, but we need a "movable plate" (as above) and a "Fixed Plate", so we will discuss that after you absorb the above.

  • IMG_0486.jpg




  • @Danal , So before I try all of this, I assume there is a way to set Z0 when doing a tool change when the top of stock is no longer there, i.e. if I did a 3D adaptive clearing, I no longer have anything residing at top of stock?

  • @gement81 said in Probing X, Y, and Z for CNC job with tool changes:

    @Danal , So before I try all of this, I assume there is a way to set Z0 when doing a tool change when the top of stock is no longer there, i.e. if I did a 3D adaptive clearing, I no longer have anything residing at top of stock?

    Yes. That is where the fixed plate comes in.


    • When you zero Z before any cutting, probe to the movable plate as described above, and this sets Z 0 to top of stock for the tip of THAT individual tool, as described above.

    • ALSO before any cutting, with that same tool: Probe to the fixed plate, and record the Z (in absolute machine coordinates). This is a macro or similar. Given that the plate is fixed, this macro can be fully automated.

    • Later, when changing tools, another macro probes the NEW tool to the fixed plate, does math with the 'recorded' Z from step 2 above, and sets a new Z in the Work Coordinate System. (or a tool length offset, the result is the same).

    The concept is not hard... the details of the macros to do this take a little to make bullet proof. Again, Duet DWC GUI does not help, nor are there macros (including from me, this is the exact reason I don't use Duet for CNC). Having said that, it can be done, I've had to do it on TinyG and Chilipeppr and more.

  • That CNC router has had about five different controllers, going all the way back to Mach and a "break out board" (BoB) style lash up. If you count variants in attaching the same controller, maybe 10 ways of doing it.

    During the most recent upgrade, I based a huge amount of my "what CNC goes on this router?" on "who has out of the box, fully debugged, two plate probing for tool changes?". That caused me to pick PlanetCNC.

    Also, I use Nema25s and Geckko stepper drivers at 70V. (yes, seven tee) with a huge toriod in the 70V supply (for instant blips in current). You can see the Toriod, black circle in a box below the table in the longest shot. It probably weighs 20 lbs. (barbarian units).

    Therefore, I am absolutely committed to external drivers (for reasons beyond simple current rating) and Duet is not really great at external driver support. About the only way to do it is with a Duet 2 and pick the step/dir/enable from the Duex5 connector. I just did not want to mess with a board that has drivers I was bypassing.

    I feel kind of bad saying all that on a Duet board; at the same time, those are the specific reasons that I don't run Duet for CNC. YMMV

  • Just on other general DIY CNC: The spindle is a Bosch router with a conversion kit from "think and tinker" that makes it have .00002' or less total runout. It also has a "super pid" speed controller attached, with optical tach, so that it will cut at correct speed without sagging.

    The overall design is hybrid wood/steel with V-Groove bearings riding on the steel. It is very similar to a bunch of "Joe's CNC" designs; however, it is ultimately the brainchild of Steve Klemp at Ricochet Products.

    The whole 70V / Toriod thing comes from me and Steve working out voltage/torque/gearing optimizations in brushless motors power systems in the early days of extreme high power (several kilowatts in a 2 or 3 kilo package), aerobatic, model RC helicopters. I was too old to have the reflexes to be a super pilot, but Steve and I put power to weight ratios in the hand of people like Anthony Jager and Curtis Youngblood and Alan Szabo, power ratios that kicked nitromethane based fuels right off the field. Aerobatics were transformed, and helicopter drag racing just came to an end because the electrics kicked the nitro birds so badly. And Steve and I learned a lot about how to generate power/torque/etc without burning things up (too often, anyway).

    In short, there are some unique things in that odd looking chunk of wood and metal, and it has cut a LOT of things down through the years, as it has had its various controllers.

  • Thanks Danal, as a follow up, could you share with me a small list of the g/M codes that I would need to use to create the macros? That would give me a place to start researching. I am very familiar with 3D systems as I run an inspection lab where I work and program optical inspection systems as well as CMMs and other instruments. I also have a background in CT scanning and post processing of CT data. I just need a place to start.

    I will Pseudo code my thoughts as to how to approach the above and run it by you to make sure I am on the right track before I start to attempt to code all of this.

    Thank you so much for your help. I was feeling rather lost.


  • On a side note, do you use the same input on the duet for both touch plates?


  • You can also use the Ooznest Workbee version of DWC which is customised for use with CNC. It also has an feature for probing using a touch plate.

    I’ve just set my CNC up with it and also need to figure out all these probing macros, just been setting xyz manually so far.

    The problem I have is I’m using all 5 endstops as endstops so need to figure out a way of attaching a probe plate to the probe input on the duet2 if possible.

    I’m also exploring the possibility of setting up this interface for CNC as the PanelDue isn’t really helpful for CNC either. Unless there is some other PanelDue firmware that I’ve not found yet 🤔

  • OK, so I got the ooznest workbee firmware and web interface working and sucessfully was able to set the 0,0,0 location for my workpiece.

    Now what I would like to do is be able to tool change and set the new z=0 value for the new tool. Obviously, now that I have machined stock, I can no longer use my probing piece that I set on the corner of my stock when I started.

    I assume that after I setup the initial tool on top of the workpiece, I will have to move my probe calibration plate to directly on the table, probe a point, store and store the offset so I can recalculate Z for the second tool.

    When I change tools, I would probe the calibration plate and recall the offset from the original and apply it to the second tool. I have no clue how to do this.

    Help please.