For those of you still following along patiently, I got tired of trying to get the spindle to orient and failing. Maybe with more tuning it'd be OK, but I really need it to be 100% reliable. Even 99% reliable means 1 out of 100 tool changes will fail - not acceptable.
I think the biggest probelm is that I've got a 2-pole induction motor spindle, and the VFD just isn't capable of really fine, low-speed positioning type moves. The VFD is great at low RPM, but it's fighting the motor and spindle inertia.
And I'm sure Andy (and others) are sick of holding my hand through this one even if they haven't bit my head off yet.image missing /media/kunena/emoticons/sad.png
So... I concluded a mechanical solution was in order. LCNC gets it close, and a shot-pin of some sort nails the position.
Step 1 - find an air cylinder. (happened to have a couple of cute little Festos in the junk drawer)
Step 2 - mount something on the spindle with a notch for the air cylinder to engage
Step 3 - mount something on the end of the air cylinder to engage the notch
Step 4 - fire the air cylinder and then run the orient cycle
Step 5 - spindle orients, gets close, and the air cylinder forces whatever it is in to the notch and locks it in the right place.
Taking a page from the old Fadal orientation lock assembly, I turned a brass ring that fits over the spindle upper preload nut. This nut has 3 spanner pockets just right for set screws to lock in. Drill 3 holes for set screws, mount it on the nut with a slight press fit, and snug it down.
Mount some 11mm OD roller bearings to the end of an air cylinder. These roll on the brass ring while it's doing the orient move.
Slide the ATC carousel in and engage a pocket on a tool in the spindle. Rotate the tool in the fork a bit (my forks have BT30 alignment tangs), and mark where the air cylinder lock rollers just touch the ring.
Get the ring off, and use a 3/8" end mill to plunge straight down through the ring. I made the arc pocket about 0.100" deep (radius), so a little less than 1/4 of the bearings drop in to the pocket. And because the pocket is slightly narrower than the bearing, the bearing is only touching at two contact lines - no rocking back and forth in a valley. Plus the pocket can wear a bit over time and still have precise alignment.
Connect the air cylinder to a solenoid valve with some speed valves so it doesn't slam.
Connect the valve to a spare Mesa output, and then to motion.digital-out-nn. Solenoid valve is a 3-way, so the rest position is retracted.
Extending the rollers and letting them ride on the brass ring seems to work just fine - LCNC moves the spindle at M19, and it just has to get within about +/- 10 degrees and the air pressure on the bearings forces the pocket (and thus the spindle) in to alignment. LCNC sees that it's within the alignment tolerance and shuts off - no fighting the alignment lock.
Just tested it and it nailed the orient in half a second 10 out of 10 times. No fighting, no drama, no noise - bang on.
Next step is to wire up the proximity sensor that came with the cylinder and connect it to motion.digital-in-nn for a safety function. I don't want the spindle to start with this thing engaged. On the other hand, I think the roller & shallow pocket will cause way less damage than a traditional tapered pin & notch if something goes sideways.
And I've got a spare air cylinder if I do damage something...image missing /media/kunena/emoticons/wink.png
There's probably a more elegant way to do this, like using a spring-loaded bellcrank so the air cylinder rod isn't seeing any side loads. But this seems to work and now I can get back to the main ATC project.