Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: Sep 6, 2006


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

Acquiring a Waveform of Data

6 ratings | 3.00 out of 5
Print
Acquiring a waveform of data involves sampling the analog signal at regular intervals in order to reconstruct a digital representation of the signal. The speed at which data points are acquired is known as the sampling frequency. You should have a sampling frequency that is sufficiently high with respect to the maximum frequency component present in the input signal to generate an accurate digital representation. According to Nyquist's theorem, you must sample at greater than twice the maximum frequency present in the signal in order to be able to detect the signal. In order to get an accurate representation of the shape or amplitude of the signal, the sampling frequency must be even higher. Figure 1 shows the effects of undersampling a signal.


When performing waveform acquisition, you must specify two pieces of information in addition to the information needed for single point analog input operations: the sampling frequency (or the source for an external clock signal) and the number of samples to acquire. With this information, the DAQ board is capable of acquiring the data and placing it into a memory buffer independent of the controlling software. The control software must simply be prepared to retrieve the data from the buffer when the operation completes.

There are two types of operations that the controlling software can initiate: synchronous and asynchronous. In synchronous operations, the software makes a call to a DAQ function that begins the waveform acquisition and then waits for the result of the acquisition and returns it to the program upon completion. This method is useful because often only one or two calls are needed to enable it. However, the control software cannot monitor or interrupt the acquisition while it is in progress. For applications that need to monitor an ongoing waveform operation, you should use asynchronous functions. Using this method, one call to a DAQ function begins the waveform operation and then returns immediately. The control software is then responsible for monitoring the progress of the acquisition, and retrieving the data when it is finished. This allows the control software to perform other processing during the acquisition, as well as allowing it to monitor, and possibly abort, ongoing waveform acquisition.


6 ratings | 3.00 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).