Just to get a quick understanding of how to implement the Piddef, computePID and setPWM functions in a closed loop motion control system, does these following assumptions apply?
I have a 24VDC proportional valve that will regulate flow of hydraulic fluid. Full flow occurs at 1.5 amps, zero flow at ~0 amps.
I am using a imcremental encoder to monitor position and based on that feed back use the PID functions to control the valve.
My question's is:
When I setup the PIDDEF function what would be the limit variable? I think it might be the max value the DUTY CYCE will be for the setPWM function. 100 percent duty cyce would be the max limit coming out of the computePID function, I hope.
I believe, I grasp the usage of the above functions but I am just hoping that the limit variable of the PIDDEF statement will correspond to amount of duty cycle in the setPWM statement. That is Max Limit equals 100 percent duty cycle which is provided by the computePID function.
Any info would be appreciated.
Thanks in advance.