Example Programs

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx Retriggerable Finite Acquisition

Overview

This program leverages the retrigger ability of counters to overcome the fact that start triggers for analog/digital acquisitions are not retriggerable. 

Description

The attached VI conducts 'retriggered' finite acquisitions on an analog signal.  It does this by creating a retriggerable finite pulse train and using this finite pulse train as the sample clock for a continuous acquisition. Every time the trigger fires, a finite pulse train is generated which acts as the sample clock for the continuously acquiring analog input task.  The analog input task therefore only returns samples according to the finite pulse train generated.

The trigger for this example can be any TTL signal: on-demand pulse or hardware timed pulse train.

Requirements

Software

  • LabVIEW 8.6 or compatible
  • DAQmx 8.7.2 or compatible

Hardware

  • NI DAQ device with Analog Input and Counter/Timer

Steps to Implement or Execute Code

  1. Select your device and analog input channel in the Channel Being Read on the front panel
  2. Select your "Retriggerable Counter" for the sample clock output
  3. Select the PFI line corresponding to the Retriggerable Counter
  4. Select the Trigger Source
  5. Specify your Finite Acquisition Parameters (Frequency & Samples Per Trigger) as desired
  6. Run the VI

Additional Information or References

VI Snippet

Retriggerable.png

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

Comments
Todd S.
NI Employee

thanks for posting! could you rename your attachment to include the LabVIEW version? "_lvXX.vi" would be fine.

Todd S.
LabVIEW Community Manager
National Instruments
Member nooobieee
Member

Hi ,

   How can I modify this VI to generate pulses using the counter in time units? I want to leave it high for 3 s and low for 5 seconds and trigger the data acquisition every high time ?

Active Participant CharlesD
Active Participant

On the first functional block (DAQmx Create Virtual Channel) you should be able to select CO Pulse Time from the drop down.  From this you should now have access to the low and high time inputs to the Counter Output VI where you can select how long you will stay low and how long you will stay high.

PS if this does not work - try calling NI Support @ 866-275-6964.

Member nooobieee
Member

Thank you so much.

Contributors