Multi-Loop Control

Most of the PID VIs are polymorphic VIs for use in multiple control-loop applications. For example, you can design a multi-loop PID control application using the PID VI and DAQ functions for input and output. A DAQ analog input function returns an array of data when you configure it for multiple channels. You can wire this array directly into the process variable input of the PID VI. The polymorphic type of the PID VI automatically switches from DBL to DBL Array, which calculates and returns an array of output values corresponding to the number of values in the process variable array. You also can switch the type of the polymorphic VI manually by right-clicking the VI icon and selecting Select Type from the shortcut menu.

When the polymorphic type is DBL Array, other inputs automatically change to array inputs as well. For example, the PID VI inputs setpoint, PID gains, and output range all become array inputs. Each of these inputs can have an array length ranging from 1 to the array length of the process variable input. If the array length of any of these inputs is less than the array length of the process variable input, the PID VI reuses the last value in the array for other calculations. For example, if you specify only one set of PID gains in the PID gains array, the PID VI uses these gains to calculate each output value corresponding to each process variable input value. Other polymorphic PID and Fuzzy Logic VIs operate in the same manner.