Relevant files attached. Note that I don't use orient for anything other than homing the spindle so my drive dogs line up with the ATC forks. My VFD isn't capable of holding a position. It just gets close enough for the shot-pin to drop in and hold it. No way I could reliably command a specific position.
- 01_PBATC.hal
- main hal file. All loadrt & addf are here.
- 02_atc.hal
- connections to motion.digital/analog in/out.
- m27.ngc
- one of the toolchange files used in my M6 sequence
- Used for initial homing of the spindle
- turns spindle-index-enable on & off via motion.digital-out-07 (M64/M65 P7)
- After that, it rotates the spindle at 250rpm for a bit so orient can re-aquire the index pulse.
- m23.ngc
- Another toolchange file
- Used for all subsequent spindle orientation (takes less time)
- Does not require the spindle-index-enable dance.
NOTE - If I remember correctly.. I was wrong in my earlier post. The symptom cured by the
motion-digital-out-07 => tristate => index-enable fandango was not continuous spinning. It was the spindle settling at the wrong location during an orient command.
Basically, wherever the spindle was when orient was commanded was interpreted as the 'index' point, and orient would rotate the spindle until it found the false index plus whatever offset I had programmed in INI file.
Both spindle.0.index-enable and pid.s.index-enable need to be reset to false before orient will work If I don't turn on/off the spindle-index-enable before orienting:
- Orient commands rotation
- Shot pin fires (spring-loaded)
- Shot pin drops in
- Orient keeps trying to rotate because it's not at the false index
- Shot pin complains very loudly
- Orient muscles through with the shot pin & pocket crying
- Orient errors out because it just got a load applied by the shot pin and can't make it to the finish line in time
- I cry a little
Keep in mind that this complicated config may not be necessary for a different hardware combo. If a servo spindle is used it's likely capable of holding position properly. Even a 'smart' VFD and a 4pole induction motor might be able get close enough for a basic homing routine.