Application Case 3—Hardware-Timed Input, Software-Timed Output
Requirement
"My analog input task needs to be hardware-timed. My output task does not need hardware synchronization with the sample clock edge."
Solution
Use the DAQmx Real-Time»Report Missed Samples property, which
returns an error if new samples are available before the read operation finishes converting samples from the previous iteration.
Advantages
- Input samples are hardware-timed.
- Read, process, and write operations can overflow into the next sample period, as long as enough time remains for the subsequent read operation to complete on the next set of input samples. An application that acquires data from multiple channels on multiplexed devices (such as E Series and M Series) has to wait for the device to convert input samples before the read operation can return. By allowing process and write operations to overflow into the next sample period, the application takes advantage of otherwise idle time. This enables the application to achieve higher control-loop rates.
Restrictions
Output updates suffer from software jitter because they are not hardware-timed.
Sample Application
An example of this kind of application is an analog control loop that reads samples from a specific number of multiplexed analog input channels, processes the data using a control algorithm (such as PID), and writes the new control values to the analog output channels using a software-timed task.
Sample Timing Diagram

Sample Implementation
- Set the Report Missed Samples property for the analog input operation to True.
- The analog input operation returns an error if new samples are available before the read operation finishes converting samples from the previous iteration.
Sample Block Diagram

Notes
- If, when an Analog Input Read overflow error occurs, you prefer to receive a warning rather than an error, set the Convert Late Errors to Warnings property to True.
- Do not use the Wait For Next Sample Clock VI and the Report Missed Samples property within the same LabVIEW loop.
- Only hardware-timed single-point analog input tasks support the Report Missed Samples property.
- Because the analog output task is software timed, the value is written out as soon as the write call is initiated. It does not wait for a hardware clock to output the data.