ni5690_getActualGain

NI RF Signal Conditioning Devices Help (NI-5690 14.5)

Edition Date: March 2015

Part Number: 371326D-01

»View Product Info
Download Help (Windows Only)

ViStatus Status = ni5690_getActualGain (ViSession Instrument_Handle, ViConstString Channel_Name, ViReal64 Frequency, ViReal64 *Actual_Gain);

Purpose

Returns the actual gain in dB applied to the input signal for the Channel_Name and Frequency specified. If you want to retain the previous state of the device, do not call the ni5690_getActualGain function before you call the ni5690_configurePath function or the ni5690_configureGain function.

For the NI 5695, when you call the ni5690_getActualGain function before the ni5690_configurePath function for CH 0, CH 0 reinitializes to a default state (Main Path). When you call the ni5690_getActualGain function before the ni5690_configureGain function for CH 1, CH 1 reinitializes to its default state (maximum attenuation).

For the NI 5690 and NI 5691, when you call the ni5690_getActualGain function before the ni5690_configurePath function or the ni5690_configureGain function for CH 1, CH 1 reinitializes to its default state (maximum gain and Main Path). Additionally, if you call the ni5690_configurePath function before you call the ni5690_configureGain path, CH 1 reinitializes to the default state for the path (Main Path).

Parameters

Input
Name Type Description
Instrument_Handle ViSession Identifies the instrument session. The instrument handle was obtained from the ni5690_init function and identifies a particular instrument session.
Channel_Name ViConstString Specifies the channel in which the Actual_Gain is applied.
Frequency ViReal64 Specifies the frequency of the RF signal in Hz.
Output
Name Type Description
Actual_Gain ViReal64* Returns the gain, in dB, applied in the specified Channel_Name at the specified Frequency at normal ambient temperature. For spectral measurements, subtract this gain from your calculated spectrum to remove the effect of the RF signal conditioning device on the measurements. For I/Q measurements, convert the gain to linear units and then apply the correction to the I/Q data. Negative values indicate attenuation.

Return Value

Name Type Description
Status ViStatus Returns the status code of this operation. The status code either indicates success or describes an error or warning condition. Examine the status code from each call to an instrument driver function to determine if an error occurred.

To obtain a text description of the status code, call the ni5690_error_message function.

The general meaning of the status code is as follows:

Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

WAS THIS ARTICLE HELPFUL?

Not Helpful