Acquiring a Waveform of Data

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.
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/).
