Acquisition Functions
- Updated2023-09-20
- 1 minute(s) read
Acquisition Functions
Reading versus Fetching
You can acquire data by calling either a Read function or a Fetch function. The Read functions are the easiest way to acquire data from your digitizer. They initiate an acquisition, wait for it to complete, and retrieve the data.
Fetch functions assume that the acquisition has already been initiated. Both Read and Fetch functions accept a timeout parameter and a number of points to retrieve. They will efficiently sleep while waiting for the number of requested points to be acquired.
Using a Fetch function in conjunction with the acquisition status function allows you to perform other operations while waiting for the acquisition to finish. When acquisition status reports the operation is complete, you can call the Fetch function with any timeout value to retrieve the data.
You must use Fetch functions to acquire binary data because Read functions allow retrieval of scaled data only. Fetching binary data is faster and requires less user memory than fetching scaled data.
If you want to use a software trigger to start the acquisition, you must use a Fetch function because Read functions block until the operation is complete.
Refer to Fetching Data for more information on using Fetch functions.
Reading and Fetching Examples
The Getting Started example uses a Read function. Most examples use Fetch functions, but the Binary Acq example provides the least complicated source code. You can find shortcuts to these examples at Start»All Programs»National Instruments»NI-SCOPE»Examples.