IviSpecAn_ConfigureLevel
IviSpecAnBase Capability Group
C Function Prototype
ViStatus IviSpecAn_ConfigureLevel (ViSession vi, ViInt32 amplitudeUnits, ViReal64 inputImpedance, ViReal64 referenceLevel, ViReal64 referenceLevelOffset, ViBoolean attenuationAuto, ViReal64 attenuation);
Purpose
This function configures the vertical settings of the spectrum analyzer. This corresponds to settings like amplitude units, input attenuation, input impedance, reference level, and reference level offset.
Parameters
Name | Type | Description |
---|---|---|
vi | ViSession | The ViSession handle that you obtain from the IviSpecAn_init or IviSpecAn_InitWithOptions function. The handle identifies a particular instrument session. Default Value: None |
amplitudeUnits | ViInt32 | Pass the units you want the spectrum analyzer to use for input, output, and display. The driver sets the IVISPECAN_ATTR_AMPLITUDE_UNITS to this value. Valid Values: - IVISPECAN_VAL_AMPLITUDE_UNITS_DBM - Sets the spectrum analyzer to measure in decibels relative to 1 milliwatt. - IVISPECAN_VAL_AMPLITUDE_UNITS_DBMV - Sets the spectrum analyzer to measure in decibels relative to 1 millivolt. - IVISPECAN_VAL_AMPLITUDE_UNITS_DBUV - Sets the spectrum analyzer to measure in decibels relative to 1 microvolt. - IVISPECAN_VAL_AMPLITUDE_UNITS_VOLT - Sets the spectrum analyzer to measure in volts. - IVISPECAN_VAL_AMPLITUDE_UNITS_WATT - Sets the spectrum analyzer to measure in watts. Default value: IVISPECAN_VAL_AMPLITUDE_UNITS_VOLT |
inputImpedance | ViReal64 | Specifies the value of input impedance, in ohms, expected at the active input port. This is typically 50 ohms or 75 ohms. The driver uses this value to set the IVISPECAN_ATTR_INPUT_IMPEDANCE attribute. Units: Ohms Default Value: 50.00 ohms |
referenceLevel | ViReal64 | The calibrated vertical position of the captured data used as a reference for amplitude measurements. This is typically set to a value slightly higher than the highest expected signal level. The driver uses this value to set the IVISPECAN_ATTR_REFERENCE_LEVEL attribute. Units: The units are determined by setting the Amplitude Units parameter of this function or by setting IVISPECAN_ATTR_AMPLITUDE_UNITS attribute. Default Value: 0.0 |
referenceLevelOffset | ViReal64 | Specifies the offset value to the reference level. This adjusts the reference level for external signal gain or loss. A positive value corresponds to a gain while a negative number corresponds to a loss. The driver uses this value to set the IVISPECAN_ATTR_REFERENCE_LEVEL_OFFSET attribute. Units: dB Default Value: 0.0 |
attenuationAuto | ViBoolean | Specifies whether the spectrum analyzer is enabled for auto attenuation. When you set this value to VI_TRUE, the attenuation is automatically selected. When you set this value to VI_FALSE, the attenuation is set to manual selection. The driver uses this value to set the IVISPECAN_ATTR_ATTENUATION_AUTO attribute. Valid Values: VI_TRUE - Attenuation is automatically selected VI_FALSE - Attenuation is manually selected Default Value: VI_FALSE |
attenuation | ViReal64 | Specifies the input attenuation (in positive dB). This means that if 10dB is selected, the result is a reduction in the signal level of 10 dB. The driver uses this value to set the IVISPECAN_ATTR_ATTENUATION attribute. Units: dB Default Value: 0.0 Note: If auto attenuation is turned on, this value is ignored. |