This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

Generate Software Timed Trigger with NI-DAQmx in LabVIEW

Updated Sep 19, 2025

Reported In

Hardware

  • CompactDAQ Chassis
  • CompactRIO Chassis
  • PXI Chassis
  • PXI Digital I/O Module
  • Digital I/O Device
  • Analog Output Device
  • C Series Universal Analog Input Device

Software

  • LabVIEW

Driver

  • NI-DAQmx

Issue Details

  • I have an NI hardware configuration and I want to use one digital or analog input signal to trigger a particular task or operation on my LabVIEW code.
  • I want to synchronize two tasks to execute one after the other, and my NI hardware configuration does not have the physical channels to perform a hardware trigger.

Solution

A software-timed trigger can be implemented by continuously monitoring the status of an input signal within a while loop. When a specific condition is met—such as a threshold being crossed—the loop exits and the DAQmx Start.vi is called to initiate the desired task.

 

The following code snippet demonstrates how to create a software-timed trigger using an analog input. In this example, an analog voltage value from the DAQ Assistant is monitored, and once it exceeds a defined threshold, it triggers a separate DAQmx Analog Input Task.

 

Note: The DAQ Assistant VI can be substituted with a digital input task if your application requires digital triggering instead.


Block Diagram:

Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a 
snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW diagram.


False Case:

 

Additional Information

The software timed configuration will run at one rate determined by the computer's Operating System and how it prioritizes the tasks currently ongoing. In this way, we should expect a high latency on the application.