Table Of Contents

Software-Timed I/O

Last Modified: January 31, 2020

  • Requirement—The I/O tasks do not support hardware-timed operations.
  • Solution—Apply software timing to your time-critical loop by using the Timed Loop in LabVIEW or asynchronous timers in LabWindows/CVI. Configure your NI-DAQmx tasks to use on-demand timing.


    • You can perform I/O control loops with operations that are not hardware-timed.
    • Read, process, and write operations are confined to the software timing period that you define with the Timed Loop or asynchronous timers.


    I/O samples suffer from software jitter.

Sample Application—Software-Timed I/O

An example of this kind of application is a digital I/O control loop. The application monitors the state of several discrete inputs and toggles the corresponding output based on the control algorithm. Hardware timing is not available for single-point digital I/O tasks in NI-DAQmx.

Timing Diagram

LabVIEW Example—Software-Timed I/O


Although this example is written for LabVIEW users, the principles apply if you are using another ADE, such as LabWindows/CVI.

  • A Timed Loop running off the system's time sources (millisecond or microsecond resolution) accomplishes the task. Configure the Timed Loop to run at the desired rate.
  • Configure all tasks to be software-timed (on demand).
  • The Timed Loop provides feedback to the application as to whether the previous iteration completed in time. It does this through the "Finished Late [i-1]" node.

Sample Block Diagram

  • The Timed Loop allows the application to adjust its period from within the loop, allowing the implementation of dynamic timing algorithms for control.
  • Lower-priority processes can execute while the Timed Loop waits until its next iteration.
  • Other software timing methods include the use of the Wait and Wait Until next multiple VIs (with microsecond or milliseconds resolution). These methods provide no feedback when the application falls behind.

Recently Viewed Topics