|Download Help (Windows Only)|
ViStatus Status = ni5690_configureGain (ViSession Instrument_Handle, ViConstString Channel_Name, ViReal64 Gain, ViReal64 Frequency);
Configures the gain (in dB) of a channel. A negative value indicates attenuation. This function returns an error if the requested gain is too high or too low for the device to configure at the specified frequency. This function also returns an error if the appropriate channel name is not specified.
|Note The NI 5690 and NI 5691 support configurable gain for CH 1 only, while the NI 5695 supports configurable gain for CH 0 only.|
|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 through which the input RF signal is routed and in which Gain is applied.|
|Gain||ViReal64||Specifies the gain applied to the input RF signal in dB. Actual gain may be set to the closest higher available gain setting. The gain may be set to a negative number to indicate attenuation.|
|Frequency||ViReal64||Specifies the frequency of the input RF signal in Hz.|
|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: