I've been tinkering and have a couple things set up.
cmorely, you would think that it would have _some_ means of at least open-loop speed detection (reading the position of the belt discs, etc), but it has nothing. The original operator panel has pretty well knackered, but looked like it had buttons for raising/lowering RPM. Apparently this was an operator adjustment. There's not even a place to mount a tachometer, so apparently it would be by reading the sight disc at the front.
I roughly set up a 3-position optical gate for detecting the range, kind of looks like a flux capacitor.
The thought right now is to set 3 ranges in my post processor (in Fusion 360, I did a similar thing for manual gear changes in my Nardini Fast Trace lathe). It will send a M101 P1, 2 or 3 to request one of those three ranges.
I've done some preliminary bash scripting, but I still need to write in something to ensure the spindle is on. I'm using serial commands for the VFD, so it would be great to have the capability to issue a serial command for 60Hz during this ratio change...
Code:
#! /bin/bash
#example usage: M101 P1 (changes variable pitch belt to ratio A)
#uses argument P
#parport.0.pin-13-in is input for range A
#parport.0.pin-12-in is input for range B
#parport.0.pin-11-in is input for range C
#parport.0.pin-5-out is the valve to make RPM lower
#parport.0.pin-2-out is the valve to make RPM higher
range_request = $1
case $range_request in
#change to ratio 1
#while the input for ratio 1 is not true, move RPM down until the input is true
1)
while ! [halcmd getp parport.0.pin-13-in]; do
if [halcmd getp parport.0.pin-11-in] || [halcmd getp parport.0.pin-12-in]
then
halcmd setp parport.0.pin-5-out True
fi
done
#once complete, set both airmotor valves to off
halcmd setp parport.0.pin-2-out False
halcmd setp parport.0.pin-5-out False
;;
#change to ratio 2
2)
while ! [halcmd getp parport.0.pin-12-in]; do
if [halcmd getp parport.0.pin-13-in]
then
halcmd setp parport.0.pin-2-out True
elif [halcmd getp parport.0.pin-11-in]
then
halcmd setp parport.0.pin-5-out True
fi
done
halcmd setp parport.0.pin-2-out False
halcmd setp parport.0.pin-5-out False
;;
3)
while ! [halcmd getp parport.0.pin-11-in]; do
if [halcmd getp parport.0.pin-13-in] || [halcmd getp parport.0.pin-12-in]
then
halcmd setp parport.0.pin-2-out True
fi
done
halcmd setp parport.0.pin-2-out False
halcmd setp parport.0.pin-5-out False
;;
*)
halcmd setp parport.0.pin-2-out False
halcmd setp parport.0.pin-5-out False
;;
esac
exit 0