I currently have my minimum frequency set in the VFD to 20Hz, as I thought driving the motor near zero would cause overheating. I'll try resetting that to 0Hz, and try your two options. I do like having the spindle disabled when the spindle is not on. So the real solution is to finally send my damaged spare 7i84 to Peter (Talla83), pray he can fix it, and install it so I have enough 24VDC outputs to command the VFD's quick stop pin, and also to control the electromechanical brake, which is lounging around in the motor cabinet, not pulling it's weight.
While I am also thinking spindles:
I currently have:
The VFD analog command voltage:
net spindle-vel-cmd-rpm-scaled => [HMOT](CARD0).7i83.0.1.analogout0
...and the spindle RPM measured from the encoder
net spindle-vel-fb-rps <= [HMOT](CARD0).encoder.00.velocity
In between these two is a dumb back gear and a dumb variator, and without feedback the gear ratio, and this the scale value for to scale the VFD analog command voltage to RPM is unknown.
To caclulate my instantenous gear ratio, I need to multiply the frequency by a constant to give motor RPM, and then divide encoder RPM. That value can then be setp'd to scale.0.gain
I read that HAL supports all the maths operations of the rtapi_math.h, but I could not find any syntax examples. Do I need any braces or brackets to for this? Can you use HAL signals and HAL pins as variables?
If you have to do this with INI variables, how do you get the value out of a HAL signal into the INI variable?
setp inst-gear-ratio <= spindle-vel-cmd-rpm-scaled * 56 / spindle-vel-fb-rps
verses
setp inst-gear-ratio <= [HMOT](CARD0).7i83.0.1.analogout0 * 56 / [HMOT](CARD0).encoder.00.velocity
setp scale.0.gain = {inst-gear-ratio}
It is cold in the basement, and I would prefer not to spend a couple of hours motionless in front of the control trying every imaginable combination of syntax idea

Cheers,
Mark