Hi All,
I have an AC Servo (step/dir) for a spindle on my DIY mill and am a total beginner (disclaimer). After reading Hoss' use of a stepper as an auxiliary spindle for tapping, I tried to get tapping working using the swap axis command in Mach3. This sets up your spindle as an A axis (in my case as a rotary axis in contrast to Hoss' approach). This has certainly been done before, but I think i may have added a new twist (apologies if this has been done before).
I read that one can pass 3 parameters in a macro call in Mach3. Therefore I wrote a single macro (M951) that gets a P, Q, and R parameter passed during the call. P = depth, Q = retract height, and R = pitch. Thus with one macro, you can tap any size thread. This macro has worked very well, but still required hand editing G-code produced by Fusion 360 (my preferred CAD/CAM).
So, I edited the post to intercept the G84 (specifically the "right hand tapping") call. Instead of producing a G84 output, it produces an M951 Px, Qx, Rx output for every hole in the list. Surprising to me, it really seems to work, and requires no hand editing. It is important to remember, this post will only intercept the right-hand tapping (not the "tapping" or "left-hand tapping" cycles in Fusion360). Also note- you must have the thread pitch entered in your tool library for the tap, or no information about the pitch is available to send to the macro.
Below, I attach the macro and the post in case anyone would like to try. Tomorrow, I will try to upload a video of it tapping. I will also try to upload a sample fusion360 file with its resultant G-code.
Note- as an added benefit, my macro homes the A axis prior to starting the tapping move- it should be possible to re-enter a tapped hole (if cleaning it up is necessary), at least on my machine which uses an HSK40C spindle (thus has a fixed angular position for the tool holders). I have not tried this yet (fear)...
hope this helps someone.
jake