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

Currently Being Moderated

Continuous Analog Acquisition with Producer Consumer Architecture in C#

VERSION 2

Created on: Apr 7, 2009 12:39 PM by Steve_B - Last Modified:  Apr 7, 2009 2:14 PM by Steve_B

Functional Description:

This example demonstrates how to acquire a continuous amount of data using the DAQ device's internal clock and store the data in a text file. This Program uses thread safe queues to move the data between threads. The data is obtained in a producer event based callback and then is produced in another event based callback.

 

Instructions for Running:

1. Select the physical channel corresponding to where your signal is input on the DAQ device.

2. Enter the minimum and maximum voltage values.

Note: For better accuracy, try to match the input range to the expected voltage level of the measured signal.

3. 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. Also, in order to avoid Error -50410 (buffer overflow) it is important to make sure the rate and the number of samples to read per iteration are set such that they don't fill the buffer too quickly. If this error occurs, try reducing the rate or increasing the number of samples to read per iteration.

4. Set the Data set size that you want to record. This program will aquire continuously until this value is reached.

5. Select the Start button to begin the acquisition.

6. Wait until enough samples have been acquired.

7. Select the Stop button to stop the acquisition.

 

Images:

Settings.jpg

The settings have been configured.

 

Running.jpg

The program is running.

 

Done.jpg

The program has stopped.

 

Downloads:
Average User Rating
(2 ratings)




There are no comments on this document

More Like This

  • Retrieving data ...