PIDdef ch, lmt, P, I, D |
Purpose | To set up the parameters for a Proportional, Integral and
Derivative (PID) Controller function. The function PIDcompute( ) will make use of the
parameters defined here for the corresponding channel ch.
Transfer Function of a PID Controller are defined as follow: ch should an integer constant between 1 and 16. The remaining four parameters: lmt, P, I & D can be integer or floating point constants or variables. For the lmt term, the computed controller output value by the PIDcompute( ) function is not allowed beyond the + lmt value (i.e. lmt represents the saturation point of the computed controller output). PIDcompute( ) function implements "Integrator anti-windup" feature, which will avoid integrating the error signal when output is already saturated . Important: When this statement is run, the integral and differential terms of channel ch is set to zero. Hence PIDdef should be run only once during initialization and not repeatedly executed. Otherwise the PIDcompute( ) function will not run properly because of the loss of integral and differential data.
|
See Also | PIDcompute( ) |