OK. So once I had valid quadrature outputs I tweaked the HAL and INI settings and finally had spindle RPM from the sensor and switched over from PWM 0V-10V to step/dir to the spindle. The two pulleys weren't exactly 1:1 so I changed the ration of pulses per rev for the spindle and now asking 1000 RPM gives 1000 RPM on the spindle. No PID stuff needed.
Following the directions from one of the LCNC links I created a tool table.
Then wrote some G-Code to load tool #1 and center drill the piece of round stock in the photo. Just a small dimple to guide the drill bit.
Back to the tool change position and remove the center drill and install the chuck with #21 drill bit.
I used a peck drilling G-Code with 1000RPM.
Back to the tool change position. It stops and waits for an OK button click on the screen. Install the 10-32 tap and click OK.
Now the scary part. Watch it rapidly move to 0.1" above the work and then shoot over at 150ipm to the vise holding the piece.
Just clears it of course since the new tool changes the zero position. And then the spindle starts turning at 200 RPM and the knee moves up at a rate that matches the 200 RPM. The tap enters and cuts threads. At 0.7" depth it stops, the spindle reverses and the tap exists. Too cool really.
A cleanup with a deburring tool on the hole entry and the brass 10-32 screw threads in perfectly.
The next day the fully spiral (rather than spiral tip) tap arrived from amazon.ca. I added a #7 drill bit and the 1/4-20 tap. After some issues with setting the tool heights etc I ran the same program with the G-Code set for 0.050 pitch threads. Wow! Spiral chips from the tap coming out the top. A 1/4-20 bolt threaded in smoothly.
I need to clean up the wiring of course so the spindle sensor is more permanent and eventually I'll change to all metal mounts but this was a fun project. Learned all about offsets etc. in CNC. A few collisions and drilling in the wrong place were part of the learning process.
Next project is mist cooling which requires air. And once the air fittings are there I'll install the Princess Auto butterfly impact wrench as a power draw bar. That will make tool changes easier.