Yes, good point. My spindle doesn't have an encoder, but I'm hoping to add one eventually for rigid tapping.
With an encoder and the JG command, to make the Galil driver work without a diode on the output, it would have to change the encoder polarity using the MT command (MT 1 for forward, MT -1 for reverse polarity).
Kenny, I assume the Galil driver use JG commands for spindles with an encoder, right? If so, then in your update you sent me, we would have to add MT commands to the Custom Notify messages and M3/M4 macros as well for people with encoders. But, your updated driver as is will still handle it.
I should mention, I don't like the diode because it creates a voltage drop which can skew the actual spindle speed (make it non-linear). I know, maybe it's splitting hairs. It depends on the current through the diode. My VFD speed input is about 30K ohms, so at 10V, that's 0.33 mA at 10V. A common diode will only drop about 0.1V at 0.33mA, so that's fine. But VFD's with a lower input impedance (e.g. 5K or less will cause a 0.2V to 0.5V drop through the diode), and the voltage drop through the diode starts to become an issue for linearity (spindle speed will not be linear with respect to commanded voltage).
But, using JG commands and an encoder on the spindle, this doesn't matter. The Galil card will adjust the voltage to maintain the speed based on the encoder feedback. That's useful.
Mike