You won't need to buy a THC. You'll have to build your own using the ultrasonic sensor. All the THC does is compare tip voltage to a set voltage. If the tip voltage is lower than the set voltage, the THC sends a THC UP command. If it's higher, it sends a THC DOWN command. You'll need to build some electronics to read the ultrasonic sensor, compare it's output to a set constant and output to a second PP on the Mach3 PC.
You will also have to create a PID loop to stabilise the function OR you will be chasing it all day. Most THC have the built in pid loop to filter the results and tune out the oscillations.
For the most part it cannot be done without using the THC functions in mach. Only the THC functions can interact with the already buffered moves for Z.
Depends on the output of the sensor
Do you have the specs?
(;-) TP
The sensors are capable of providing a current or voltage signal, and I believe the voltage range is 0-5V, but will confirm when I go in today. It is trivial to condition the signal IF it doesn't match the THC voltage range. An extremely simple Op-Amp circuit would suit the purpose. Set the gain and you're done. Designing a PID controller on the other hand is not quite so trivial. Not extremely hard or anything, but it would take time that I don't have. Even if I design and/or build a PID, I will have to tune it to get it to work as desired. PID in THC controllers are already tuned for the application. I would much rather just use an existing, proven design then reinvent the wheel. I'll check the specs on those sensors.
A THC seems to fit the bill, unless anyone knows of a simpler, proven solution?
That being said, what THC would people recommend?