Hi all,
I am working on a weiler cnc lathe retrofit. So far it works well, the only thing left ist the PID tuning of the spindle speed.
The spindle also works without PID but the offset to the actual speed varies quite a bit (not linear), I was hoping to correct this with a PID loop.
VFD: Huanyang with analog voltage input (0-10V).
Currently I am trying to figure out how to implenent the PID setup for this.
How can I scale the PID output to 0-10V (or 0-4600 rpm) ? Currently my PID output can be negative and so the pwmgen.value of the Mesa7i96s spindle is negative which does not work for my setup. I feed the PID ouput to the scaled pwmgen input.
I think the system has to adjust the current value sent to the pwmgen.value just below and above the current setpoint in order to adjust for velocity offset. I was thinking of using the sum function (which kind of works but also does not really correct the non-linearity) but I think there must be an easier way...
Cheers,
David