Programmatically Autotuning a Previously Implemented PID Controller

You can use the PID Online Autotuning VI to tune a controller you implement or previously implemented with the PID Advanced VI.

Note��You must use the PID Advanced VI to implement the controller. You can implement PID controllers with various PID VIs, but PID Advanced is the only VI that supports putting the controller under manual control, which is necessary for using the PID Online Autotuning VI.

You also can use the PID Advanced Autotuning VI to implement and autotune a PID controller from a single VI.

Complete the following steps autotune a previously implemented PID controller.

  1. If you have not already done so, implement a PID controller using the PID Advanced VI.
  2. Put the controller in manual mode by setting the auto? input of the PID Advanced VI to FALSE.
  3. Add the PID Online Autotuning VI to the block diagram within the control loop but to the left of the PID Advanced VI.
  4. Manually select the polymorphic instance of the PID Online Autotuning VI.
  5. Without deleting the controls, constants, or shift registers that contain the values, delete the wires to the setpoint, process variable, and PID gains inputs of the PID Advanced VI.
  6. Wire the values to the Setpoint in, Process Variable, and PID gains in inputs of the PID Online Autotuning VI.
  7. Create a Boolean control with latched mechanical action and a default value of FALSE, and wire the control to the Autotune? input of the PID Online Autotuning VI.
  8. Wire the setpoint out, Process Variable Out, and PID gains out outputs of the PID Online Autotuning VI to the setpoint, process variable, and PID gains inputs of the PID Advanced VI.
  9. (Optional) If you are specifying a value for the dt (s) input, wire the same value to both VIs.
  10. Run the VI.
  11. Set Autotune? to TRUE to begin autotuning.

Refer to the Autotuning PID Online and Inline VI in the labview\examples\control\PID for an example of implementing autotuning with the PID Online Autotuning VI and the PID Advanced VI.

Open example� Find related examples