NI Home
Cart Cart | Help
Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Currently Being Moderated

Start Trigger and Stop After n Pulses for Continuous Analog Input with DAQmx

VERSION 1

Created on: Sep 9, 2008 3:37 PM by LaRisa_S - Last Modified:  Sep 9, 2008 3:40 PM by LaRisa_S


REQUIREMENTS:
Application Software: LabVIEW Full Development System
Development Topic: Analog I/O

Description:
This example demonstrates how to acquire a continuous amount of data (Waveform) using an internal clock and a digital start and reference trigger.
The reference trigger is generated using a counter output after a desired number of digital pulses are counted.

Instructions for Running:
1. Select the physical channel to correspond to where your signal is input on the DAQ device.
2. Enter the minimum and maximum voltage ranges.
Note: For better accuracy, match the Input Ranges to the expected voltage level of the measured signal.
3. Select the number of Samples per Channel to acquire.
4. Set the Rate of the acquisition.
Note: The Rate should be AT LEAST twice as fast as the maximum frequency component of the signal being acquired.
5. Set the Trigger Source and the polarity of the Start Trigger Edge.
6. Set the terminal to be used as the Reference Trigger Source and the number of
pulses to be counted before stopping the acquisition.
7. Configure the counter to be used.
Note: The Reference Trigger Source should be set as the Counter Output Terminal of the Counter configured in this step.

Block Diagram Steps:
1. DAQmx Create Channel - Create my channel to acquire data on
2. DAQmx Timing - Configure my timing options
3. DAQmx Start Trigger - Configure my start trigger options
4. DAQmx Reference Trigger - Configure my reference (stop) trigger options
5. DAQmx Create Channel - Create my channel to count edges
6. DAQmx Channel Property Node - Set the trigger source as the counter terminal
7. DAQmx Start Task - Start the counter task
8. DAQmx Start Task - Start the analog input task
9. DAQmx Read Property Node - Set the read position to the start of the buffer (see note)
10. While Loop - Do the DAQmx Read as long as the task is still running (DAQmx Is Task Done?)
11. DAQmx Read Property Node - Read the number of samples still in the buffer
12. If I still have samples in the buffer, read all of those samples with DAQmx Read
13. DAQmx Clear Task - Clean up all our resources related to the counter task
14. DAQmx Clear Task - Clean up all our resources related to the analog input task
15. General Error Handler - Display any errors to the user

I/O Connections Overview:
Make sure your signal input terminal matches the Physical Channel I/O Control. Also, make sure your digital trigger terminal matches the Trigger Source and Counter Controls.
For further connection information, refer to the device documentation.

 

Downloads:
Average User Rating
(0 ratings)




There are no comments on this document

More Like This

  • Retrieving data ...