Using Fetch VIs

What Are Fetch Acquisition VIs?

Unlike Read VIs, Fetch VIs such as niScope Fetch Poly and niScope Fetch Measurement Poly—acquire data asynchronously. That means these VIs store data on your digitizer until you need it, which frees up your computer to perform other tasks. However, fetching requires additional VIs that initiate waveform acquisitions and query your device to verify if the acquisition is complete.

Using Fetch Acquisition VIs

To fetch data, write a program that follows these general steps:

  1. Create a new instrument session using niScope Initialize.
  2. Configure your digitizer with NI-SCOPE Configuration VIs.
  3. Call niScope Actual Record Length to find the actual number of points your digitizer acquires for each channel.
  4. Call niScope Initiate Acquisition to initiate a waveform acquisition. Data will be acquired simultaneously on all enabled channels.
  5. Call niScope Acquisition Status in a loop to check if the acquisition is complete or in progress. This step is optional and useful if you want to perform other tasks during the acquisition. The Fetch VIs also accept a timeout that can make NI-SCOPE wait until the acquisition is complete.
  6. Call the Fetch VI you need. You can call multiple fetches if you are acquiring data from more than one channel or measurement.

    You use the same Fetch VIs for simple data acquisition and advanced continuous acquisition, such as fetching multiple records. Although the VIs only have the numSamples input parameter to determine how what data is retrieved, NI-SCOPE offers several properties that allow you to specify advanced fetching options. The Fetch Relative To and Fetch Offset properties allow you to explicitly choose the portion of a record to retrieve. The Fetch Record Number and Fetch Number of Records properties allow specifying the records to retrieve during a multirecord acquisition.

  7. Call niScope Close to close the current session.