Open atlaste opened 4 years ago
Grbl_ESP32 supports custom tool changes. If the user supplies functions to handle the custom motion, it will run those functions when the Gcode includes tool change information.
The Atari plotter machine definition is an example of how this works. It has 4 pens in a changer. When it sees the M6 Txx gcode it runs a special sequence to change the pens.
One thing I've been thinking about a lot is the issues I'm having with tool changes and top probing. You usually want to have 2 things exact: (1) the tool position and (2) the piece.
I've basically came up with this idea: For (1) you can use a simple probe fixed at the homing spot. When you go down, the probe will hit and because it's fixed, you know the z coordinate. For (2) you can use something like a servo with a switch. Actually some people have reported very good z-indexing with this approach, it's quite easy to DIY, quite resilient to dust and easy to place next to a spindle.
With these two things, it should be possible to do a proper mill & any tool change. First, you home and move down until you hit the probe, that's Z1. Before milling, you basically put the spindle above the piece, the CNC can move a bit to where the servo is, go down until its hit and you know Z2. Next, start milling till the first tool change. No need to move manually down anymore, because we already know where the piece is.
Tool changes can now be done quite easily by a delay, by storing the X/Y coords, changing the tool, homing, probing (Z3), moving back up and moving back to X/Y. With the difference between Z2 and Z3, the software can compensate for the difference and do the rest.
What does this has to do with the controller? Obviously, a lot has to happen in software, but the hardware needs to support a 'servo with a probe switch on a stick', as well as a second probe. Not sure how hard that's going to be...