IviScope_FetchWaveformMeasurement

CVI/LabWindows IVI Class Driver

IviScope_FetchWaveformMeasurement

IviScopeWaveformMeas Capability Group

C Function Prototype

ViStatus IviScope_FetchWaveformMeasurement (ViSession vi, ViConstString channel ViInt32 measFunction, ViReal64 *measurement);

Purpose

This function fetches a specified waveform measurement from a specific channel from a previously initiated waveform acquisition. You can specify a particular measurement type, such as rise time, frequency, and voltage peak-to-peak. The waveform on which the oscilloscope calculates the waveform measurement is from an acquisition that was previously initiated.

Use the IviScope_InitiateAcquisition function to start an acquisition on the channels that were enabled with the IviScope_ConfigureChannel function. The oscilloscope acquires waveforms for the enabled channels concurrently. Use the IviScope_AcquisitionStatus function to determine when the acquisition is complete. Call this function separately for each waveform measurement on a specific channel.

You can call the IviScope_ReadWaveformMeasurement function instead of the IviScope_InitiateAcquisition function. The IviScope_ReadWaveformMeasurement function starts an acquisition on all enabled channels. It then waits for the acquisition to complete, obtains a waveform measurement on the specified channel, and returns the measurement value. Call this function separately to obtain any other waveform measurements on a specific channel.

Configure the appropriate reference levels before calling this function to take a rise time, fall time, width negative, width positive, duty cycle negative, or duty cycle positive measurement.

You can configure the low, mid, and high references either by calling the IviScope_ConfigureRefLevels function or by setting the following attributes:

IVISCOPE_ATTR_MEAS_HIGH_REF

IVISCOPE_ATTR_MEAS_LOW_REF

IVISCOPE_ATTR_MEAS_MID_REF

This function does not check the instrument status. Typically, you call this function only in a sequence of calls to other low-level driver functions. The sequence performs one operation. Use the low-level functions to optimize one or more aspects of interaction with the instrument. Call the IviScope_error_query function at the conclusion of the sequence to check the instrument status.

Parameters

Inputs Type Description
vi ViSession The instrument handle that you obtain from the IviScope_init or IviScope_InitWithOptions functions. The handle identifies a particular IVI session.
channel ViString Name of the channel from which to read a waveform.
measFunction ViInt32 Characteristic of the acquired waveform to be measured.

Defined values

     
Outputs Type Description
measurement ViReal64 The measured value.

Return Values