So, I've had some time to think about this while I was waiting for a better ADC chip to arrive. I believe I can do closed loop control with the THC commands and a slaved axis. Here's what I'm thinking:
Slave Z Axis in Mach to C Axis. Use C Axis output as input to AVR. Steps/direction becomes position(encoder) info back to AVR.
Touch Probe for tool height goes through AVR to Mach. Recorded height sensor touch position can be sent for G28.1 initial height sensing (When it reaches the previous Z touch position it sends the output).
Since Mach waits for Arc Good signal, I should be able to function along these lines:
1) Mach Probes initial height - we send recorded sensor location as touch output and wait for Z to stop.
2) Mach moves to pierce height (router depth?), Z Stops
3) We see Mach Z stop, we record the position, send an ARC Good to Mach and start controlling the height.
4) Monitor for Mach Z motion. When Z retracts past initial height, stop height control.
In plasma, the torch touches off and then rises to pierce height. Can this be reversed in Mach so that, after a touch off, Mach lowers to cutting depth?
I think it could work fairly well. Does this appear potentially functional? Am I missing something?
Thanks
Brett