The Difference Between the SCOPE Fetch and Read Methods

Updated Oct 31, 2022

Reported In

Hardware

  • PXI Oscilloscope

Driver

  • NI-SCOPE

Issue Details

I couldn't find any information what the difference between the SCOPE Fetch and Read methods.

Solution

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 be completed, 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.

Unlike Read functions, Fetch functions—such as niScope_Fetch and niScope_FetchMeasurement—acquire data asynchronously. That means these functions store data on your digitizer until you need it, which frees up your computer to perform other tasks and allows for better system performance. However, fetching requires additional functions that initiate waveform acquisitions and query your board to see if the acquisition is complete.