Had a chance doing a similar stuff before. It is two-nozzle design only, and it was a relatively complex task that I have done long before SmartCool's debut. My original design goal was building a hand-free auto-nozzle (it will auto adjust the pointing angle based on tool length). Also, it is able to do fine adjustment with user commands (M-code). Although this has been done for a long while, I never used it in real production setting due to the lack of a full enclosure that I never installed.

The whole idea is using "LinuxCNC generated PWM signal to control a servo motor". And, the second PWM was actually inverted from the first one. Using LinuxCNC HAL for conversions, tool-length to angle, then angle-to-PWM.

To generate the PWM requires:
1. additional Parallel Port (an additional card installed)
2. add some LinuxCNC HAL Components (software components)
3. modify some Pthpilot HAL files (for example, postgui_tormach_mill.hal, tormach_mill_5i25.hal)
4. modify some other files (for example, /etc/modprobe.d/emc2, ...)

These was a long time ago, some details might not as 100% accurate, but the idea is genuine.

However, low clearance of this design should be fixed .