Example Code

Start a Task with a Specified Delay After a Trigger Using LabVIEW with DAQmx

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Hardware

  • Data Acquisition (DAQ)

    Software

  • LabVIEW

    Driver

  • NI DAQmx

Code and Documents

Attachment

Download All

 

Overview
This VI demonstrates how to setup a task that will start a specified number of seconds after a trigger is received.

 
Description

In this VI, when a trigger is received, the task can start after a programmable delay. This VI can be changed to delay a specific number of ticks or sample clock periods.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Wire your trigger/input output lines to your hardware and select the appropriate lines.
  2. Specify the number of seconds/ticks/sample clock periods to delay the start of your acquisition.
  3. Run the VI.

Additional Information or References
VI Snippet

005.png

**This document has been updated to meet the current required format for the NI Code Exchange.**

Gary P.
Applications Engineer
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
tangmiao
Member
Member
on

Can this set the delay time to about within 5µs, or does it depend on the DAQ deck, and if so, which one can realize this goal?

Dr.Adrien
Member
Member
on

Apparently this doesn't work with CO Pulse Freq. ( Specified property is not supported by the device or is not applicable to the task. Property: Start.Delay)

Then the initial start delay can be used, and may be made not only initial, but for each new serie of pulses : This property can be found under the DAQmx Channel » Counter Output » General Properties » More » Enable Initial Delay On Retrigger. (for models with the STC3 Timing Engine)