PID (Compatibility) VI
- Updated2025-07-30
- 5 minute(s) read
Implements a PID controller using a PID algorithm for simple PID applications or high speed control applications that require an efficient algorithm. The PID algorithm features control output range limiting with integrator anti-windup and bumpless controller output for PID gain changes. Use the DBL instance of this VI to implement a single control loop. Use the DBL Array instance to implement parallel multi-loop control.

Inputs/Outputs
setpoint
—
setpoint specifies the setpoint value, or desired value, of the process variable being controlled.
process variable
—
process variable specifies the measured value of the process variable being controlled. This value is equal to the feedback value of the feedback control loop.
PID parameters
—
PID parameters is a cluster containing the updated PID gains parameters for each controller. You can use the updated values with other PID VIs.
manual control
—
manual control specifies the value of the control output when auto? is FALSE.
options
—
options specifies the settings for the PID control.
iteration
—
iteration is the current iteration of the loop. Wire this parameter to the iteration terminal of the While Loop.
output
—
output returns the control output of the PID algorithm that is applied to the controlled process. If this VI receives an invalid input, output returns NaN. |
You can use the DBL Array instance of this polymorphic VI in multi-loop PID control applications. In this case, the length of the process variable input determines the length of the output array. Other input arrays do not necessarily need to be the same length as the process variable input. This VI resizes other input arrays to the same length as the process variable input as follows:
- If the input array is longer than the process variable input, the input array is truncated to the length of the process variable input. Additional values in the array are not used.
- If the input array is shorter than the process variable input, the last value of the input array is repeated until the size matches that of the process variable input.
In this manner, an input value that must be used for each output calculation does not need to be specified repeatedly in the array passed into this VI. Instead, the array can consist of a single value that is used for each output calculation.
Examples
Refer to the following example files included with LabVIEW.
- labview\examples\control\PID\General PID Simulator.vi
setpoint
—
PID parameters
—
options
—
hold (F)
—
iteration
—
output
—