Control Loops

You can use the LabVIEW Real-Time Module with NI-DAQmx and a DAQ device to create deterministic control applications to monitor and control a system. In a control loop application, the application continuously loops by reading samples, processing feedback, and adjusting the output.

Creating a Control Loop Application with NI-DAQmx

The following block diagram shows a typical deterministic control loop application. First, an analog value is read. This value corresponds to the process variable. This value is compared to the set point, which is specified in the Ctrl Algrthm VI in the diagram, and adjusted as necessary within the while loop, possibly using a PID algorithm. The adjusted value is then written. This value corresponds to the actuator output.

In the block diagram, the sampling rates are the same for analog input and output. Because the example shown assumes a single DAQ device, the Start Trigger synchronizes the analog input and analog output tasks. For multiple devices, synchronization works differently. Refer to Synchronization for more information. Notice also that the slave task—the analog output task—starts before the analog input task. Finally, within the loop, the Wait for Next Sample Clock VI checks to make sure that the loop executes within the specified sampling rate. If it does not, this VI returns an error.

Examples

See Also

Timing Control Loops

Key Control Concepts

Setting Priorities for Control Applications