Using DAQ Devices for PID or Feedback Control

Updated Jul 16, 2026

Reported In

Hardware

  • cDAQ-9188

Software

  • LabVIEW

Driver

  • NI-DAQmx

Issue Details

I want to use my DAQ device for a feedback control system. I want to read one sample, and then output it. I need to do PID control, or something similar. How can I do this?

Solution

One way you can implement this is by doing a software-timed analog input, and then output that on demand. You can then pass information using queues, or channel wires.

Additional Information

There are speed and determinism limitations when using a DAQ device with a standard PC for a software-timed approach. In a software-timed generation, the rate at which data is generated is controlled entirely by software. Each operation requires a separate command from the host application to the hardware, meaning the timing depends on:

  • Software execution
  • Communication between the host and the device

Because of this, the time between samples is not deterministic.

 

In contrast, hardware-timed operations use a dedicated hardware signal to control the rate of generation. This timing signal can be generated internally or provided externally, allowing:

  • Deterministic timing between samples
  • Much shorter time between samples compared to software-timed operations
  • Support for hardware triggering

Hardware-timed operations are implemented using buffered generation, where data is transferred from host memory to the device FIFO before being written to the output. This allows continuous or finite data generation independent of software execution once started.