But you *really* should keep feeding according to the revolution of the spindle on the index until it stops -- so your machine knows where the tap is when it starts in reverse.
The typical tapping head has a special chuck. It uses two ways to hold the tap. A Jacobs Rubberflex type collet to assure concentricity and a pair of plates with a combination left and right hand threaded leadscrew connecting them to clamp down on the flats on the end of the tap shank.
Some floating tap holders have similar chucks.
The main thing to consider is -- if it *does* slip and you are doing rigid tapping, it will no longer be at the right depth for the number of turns which the tap has taken.
I would look for something with the Jacobs tap chuck for this, myself. And the Procunier or TapMatic tapping heads have them, along with other features which make machine tapping easier -- including automatic reversing when you start to back out of the hole -- while the spindle is still turning clockwise. :-)
When doing tapping with a releasing tap holder in the bed turret of my manual lathe, I've made tap holders which are simply the right diameter for the shank of the tap, and a pair of setscrews opposite each other to clamp on two opposing flats.
Its called electronic gearing. For every X encoder counts, move Z axis Y encoder counts. Or the Z axis is slaved to the spindle. So, when you stop the spindle, Z motion stops. When you revese the spindle Z moves negative.
So, the idea is the spindle encoder is zeroed at the index pulse, and then counts up from there. The scale parameter sets it so one rev gives a position count of 1.00, each turn counts up by exactly 1.00 output units.
Once the encoder counter has sync'ed to the index pulse, then the Z axis is slaved to that position divided by the thread pitch. So, whatever the spindle rotation is, the Z axis follows it.
You need to adjust the spindle reversal so the Z axis can follow it. If you are just using relays to command the VFD forward and reverse, then you need to set parameters in the VFD to control the accel/decel rate. If you are using a DAC channel to control the VFD, you can have EMC give the VFD a speed ramp. I had to put a lowpass filter on the spindle speed command so the reversal was not too abrupt. The VFD could reverse just fine, but it could exceed the ability of the Z axis to follow it. After putting in the filter, it does fine. (EMC2 also has a limit component that limits change to a linear slew rate, and that has been suggested as the right way to do this. But, i had used lowpass before and knew it.)
A corollary of this is that coarser taps need to be run at lower spindle speed because the Z moves more for each rev than a fine-pitch tap. You can use Halscope to watch Z axis following error during the reversal to decide where to make these tradeoffs.
Essentially -- make sure that the encoder on the spindle can create directional information as well as angular motion. For every output pulse from the spindle in a clockwise direction, move down an amount calculated from the number of pulses per rotation from the encoder, and the pitch of the tap. If you start getting pulses in the reverse direction -- move the spindle up the same amount per pulse.
So -- let the spindle slow down and speed up in reverse at whatever speed it will do it -- and only worry about keeping the vertical position correct for the accumulated rotation.
Let's say you have a 16 TPI tap (0.0625"/revolution) and you have 360 pulses per revolution, you move down (or up) 0.000174" per pulse. (You'll need to accumulate the pulses and calculate at a higher resolution, and then command the vertical motion to a position within the resolution of the vertical position encoder.