IviPwrMeter_Fetch
IviPwrMeterBase Capability Group
C Function Prototype
ViStatus IviPwrMeter_Fetch (ViSession vi, ViReal64* reading);
Purpose
This function returns the result from a previously initiated single or dual channel measurement. Call the IviPwrMeter_Initiate function to initiate a measurement before calling this function.
After this function executes, the value of the Reading parameter depends on the math operation specified in the IviPwrMeter_ConfigureMeasurement function.
Notes:
(1) 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. You use the low-level functions to optimize one or more aspects of interaction with the instrument. If you want to check the instrument status, call the IviPwrMeter_error_query function at the conclusion of the sequence.
(2) If an out-of-range condition occurs on one or more enabled channels, the result is a value indicating that an out of range condition occurred. In such a case, the Reading parameter contains an IEEE defined -Inf (Negative Infinity) or +Inf (Positive Infinity) value and the function returns the Under Range (0x3FFA2001) or Over Range (0x3FFA2002) warning. Test if the measurement value is out of range with the IviPwrMeter_QueryResultRangeType function.
Parameters
Name | Type | Description |
---|---|---|
vi | ViSession | The ViSession handle that you obtain from the IviPwrMeter_init or IviPwrMeter_InitWithOptions function. The handle identifies a particular instrument session. Default Value: None |
reading | ViReal64 | Returns the measured value. For single channel measurements, the Reading parameter contains an actual reading on the channel specified by the IviPwrMeter_ConfigureMeasurement function. The unit of the result is the same as the value of the Units attribute. For dual channel measurements, the Reading parameter contains the result of the math operation applied to the channels specified in the IviPwrMeter_ConfigureMeasurement function. The unit of the result depends on the value of the IVIPWRMETER_ATTR_UNITS attribute and the specified operator. For Difference and Sum operations, the resulting units is the same as the Units attribute. For Quotient operations, the resulting units are in dB, except when Units are set to Watts. When set to Watts, the resulting measurement is without units. |