NI RFmx SpecAn Spectrum Configuration Functions - ni/grpc-device GitHub Wiki
- RFmxSpecAn_SpectrumCfgSpan
- RFmxSpecAn_SpectrumCfgFrequencyStartStop
- RFmxSpecAn_SpectrumCfgPowerUnits
- RFmxSpecAn_SpectrumCfgRBWFilter
- RFmxSpecAn_SpectrumCfgSweepTime
- RFmxSpecAn_SpectrumCfgAveraging
- RFmxSpecAn_SpectrumCfgFFT
- RFmxSpecAn_SpectrumCfgNoiseCompensationEnabled
- RFmxSpecAn_SpectrumCfgDetector
- RFmxSpecAn_SpectrumCfgVBWFilter
- RFmxSpecAn_SpectrumValidateNoiseCalibrationData
int32 __stdcall RFmxSpecAn_SpectrumCfgSpan (niRFmxInstrHandle instrumentHandle, char selectorString[], float64 span);
Configures the frequency range, in hertz (Hz), around the center frequency, to acquire for the spectrum measurement.
Input | ||
---|---|---|
Name | Type | Description |
instrumentHandle | niRFmxInstrHandle | Identifies the RFmx session. You can obtain this parameter from the RFmxSpecAn_Initialize) function. |
selectorString | char[] | Comprises the signal name. If you do not specify the signal name, the default signal instance is used. Example: "" "signal::sig1" You can use the RFmxSpecAn_BuildSignalString) function to build the selector string). |
span | float64 | Specifies the frequency range, in hertz (Hz), around the center frequency, to acquire for the measurement. |
Name | Type | Description |
---|---|---|
status | int32 | 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 RFmx function to determine if an error has occurred. To obtain a text description of the status code and additional information about the error condition, call the RFmxSpecAn_GetError) function. The general meaning of the status code is as follows: |
Value | Meaning |
---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |
int32 __stdcall RFmxSpecAn_SpectrumCfgFrequencyStartStop (niRFmxInstrHandle instrumentHandle, char selectorString[], float64 startFrequency, float64 stopFrequency);
Configures the start frequency and stop frequency for the spectrum measurement.
Input | ||
---|---|---|
Name | Type | Description |
instrumentHandle | niRFmxInstrHandle | Identifies the RFmx session. You can obtain this parameter from the RFmxSpecAn_Initialize) function. |
selectorString | char[] | Comprises the signal name. If you do not specify the signal name, the default signal instance is used. Example: "" "signal::sig1" You can use the RFmxSpecAn_BuildSignalString) function to build the selector string). |
startFrequency | float64 | Specifies the start frequency, in hertz (Hz), for the spectrum measurement. |
stopFrequency | float64 | Specifies the stop frequency, in Hz, for the spectrum measurement. |
Name | Type | Description |
---|---|---|
status | int32 | 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 RFmx function to determine if an error has occurred. To obtain a text description of the status code and additional information about the error condition, call the RFmxSpecAn_GetError) function. The general meaning of the status code is as follows: |
Value | Meaning |
---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |
int32 __stdcall RFmxSpecAn_SpectrumCfgPowerUnits (niRFmxInstrHandle instrumentHandle, char selectorString[], int32 spectrumPowerUnits);
Configures the units for the absolute power.
Input | ||
---|---|---|
Name | Type | Description |
instrumentHandle | niRFmxInstrHandle | Identifies the RFmx session. You can obtain this parameter from the RFmxSpecAn_Initialize) function. |
selectorString | char[] | Comprises the signal name. If you do not specify the signal name, the default signal instance is used. Example: "" "signal::sig1" You can use the RFmxSpecAn_BuildSignalString) function to build the selector string). |
spectrumPowerUnits | int32 | Specifies the units for the absolute power. |
RFMXSPECAN_VAL_SPECTRUM_POWER_UNITS_DBM (0) | The absolute powers are reported in dBm. |
---|---|
RFMXSPECAN_VAL_SPECTRUM_POWER_UNITS_DBM_PER_HZ (1) | The absolute powers are reported in dBm/Hz. |
RFMXSPECAN_VAL_SPECTRUM_POWER_UNITS_DBW (2) | The absolute powers are reported in dBW. |
RFMXSPECAN_VAL_SPECTRUM_POWER_UNITS_DBV (3) | The absolute powers are reported in dBV. |
RFMXSPECAN_VAL_SPECTRUM_POWER_UNITS_DBMV (4) | The absolute powers are reported in dBmV. |
RFMXSPECAN_VAL_SPECTRUM_POWER_UNITS_DBUV (5) | The absolute powers are reported in dBuV. |
RFMXSPECAN_VAL_SPECTRUM_POWER_UNITS_WATTS (6) | The absolute powers are reported in W. |
RFMXSPECAN_VAL_SPECTRUM_POWER_UNITS_VOLTS (7) | The absolute powers are reported in volts. |
RFMXSPECAN_VAL_SPECTRUM_POWER_UNITS_VOLTS_SQUARED (8) | The absolute powers are reported in volts2. |
Name | Type | Description |
---|---|---|
status | int32 | 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 RFmx function to determine if an error has occurred. To obtain a text description of the status code and additional information about the error condition, call the RFmxSpecAn_GetError) function. The general meaning of the status code is as follows: |
Value | Meaning |
---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |
int32 __stdcall RFmxSpecAn_SpectrumCfgRBWFilter (niRFmxInstrHandle instrumentHandle, char selectorString[], int32 RBWAuto, float64 RBW, int32 RBWFilterType);
Configures the resolution bandwidth (RBW) filter.
Input | ||
---|---|---|
Name | Type | Description |
instrumentHandle | niRFmxInstrHandle | Identifies the RFmx session. You can obtain this parameter from the RFmxSpecAn_Initialize) function. |
selectorString | char[] | Comprises the signal name. If you do not specify the signal name, the default signal instance is used. Example: "" "signal::sig1" You can use the RFmxSpecAn_BuildSignalString) function to build the selector string). |
RBWAuto | int32 | Specifies whether the measurement computes the RBW. Refer to the RBW and Sweep Time section in the Spectrum) topic for more information about RBW and sweep time. |
RFMXSPECAN_VAL_SPECTRUM_RBW_AUTO_FALSE (0) | The measurement uses the RBW that you specify in the RBW parameter. |
---|---|
RFMXSPECAN_VAL_SPECTRUM_RBW_AUTO_TRUE (1) | The measurement computes the RBW. |
RBW | float64 | Specifies the bandwidth, in hertz (Hz), of the RBW filter used to sweep the acquired carrier signal, when you set the RBWAuto parameter to RFMXSPECAN_VAL_SPECTRUM_RBW_AUTO_FALSE. |
RBWFilterType | int32 | Specifies the shape of the digital RBW filter. |
RFMXSPECAN_VAL_SPECTRUM_RBW_FILTER_TYPE_FFT_BASED (0) | No RBW filtering is performed. |
---|---|
RFMXSPECAN_VAL_SPECTRUM_RBW_FILTER_TYPE_GAUSSIAN (1) | An RBW filter with a Gaussian response is applied. |
RFMXSPECAN_VAL_SPECTRUM_RBW_FILTER_TYPE_FLAT (2) | An RBW filter with a flat response is applied. |
RFMXSPECAN_VAL_SPECTRUM_RBW_FILTER_TYPE_SYNCH_TUNED_4 (3) | An RBW filter with a 4-pole synchronously-tuned response is applied. |
RFMXSPECAN_VAL_SPECTRUM_RBW_FILTER_TYPE_SYNCH_TUNED_5 (4) | An RBW filter with a 5-pole synchronously-tuned response is applied. |
Name | Type | Description |
---|---|---|
status | int32 | 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 RFmx function to determine if an error has occurred. To obtain a text description of the status code and additional information about the error condition, call the RFmxSpecAn_GetError) function. The general meaning of the status code is as follows: |
Value | Meaning |
---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |
int32 __stdcall RFmxSpecAn_SpectrumCfgSweepTime (niRFmxInstrHandle instrumentHandle, char selectorString[], int32 sweepTimeAuto, float64 sweepTimeInterval);
Configures the sweep time.
Input | ||
---|---|---|
Name | Type | Description |
instrumentHandle | niRFmxInstrHandle | Identifies the RFmx session. You can obtain this parameter from the RFmxSpecAn_Initialize) function. |
selectorString | char[] | Comprises the signal name. If you do not specify the signal name, the default signal instance is used. Example: "" "signal::sig1" You can use the RFmxSpecAn_BuildSignalString) function to build the selector string). |
sweepTimeAuto | int32 | Specifies whether the measurement computes the sweep time. |
RFMXSPECAN_VAL_SPECTRUM_SWEEP_TIME_AUTO_FALSE (0) | The measurement uses the sweep time that you specify in the sweepTimeInterval parameter. |
---|---|
RFMXSPECAN_VAL_SPECTRUM_SWEEP_TIME_AUTO_TRUE (1) | The measurement calculates the sweep time based on the value of the RFMXSPECAN_ATTR_SPECTRUM_RBW_FILTER_BANDWIDTH) attribute. |
sweepTimeInterval | float64 | Specifies the sweep time, in seconds, when you set the sweepTimeAuto parameter to RFMXSPECAN_VAL_SPECTRUM_SWEEP_TIME_AUTO_FALSE. |
Name | Type | Description |
---|---|---|
status | int32 | 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 RFmx function to determine if an error has occurred. To obtain a text description of the status code and additional information about the error condition, call the RFmxSpecAn_GetError) function. The general meaning of the status code is as follows: |
Value | Meaning |
---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |
int32 __stdcall RFmxSpecAn_SpectrumCfgAveraging (niRFmxInstrHandle instrumentHandle, char selectorString[], int32 averagingEnabled, int32 averagingCount, int32 averagingType);
Configures averaging for the spectrum measurement.
Input | ||
---|---|---|
Name | Type | Description |
instrumentHandle | niRFmxInstrHandle | Identifies the RFmx session. You can obtain this parameter from the RFmxSpecAn_Initialize) function. |
selectorString | char[] | Comprises the signal name. If you do not specify the signal name, the default signal instance is used. Example: "" "signal::sig1" You can use the RFmxSpecAn_BuildSignalString) function to build the selector string). |
averagingEnabled | int32 | Specifies whether to enable averaging for the measurement. |
RFMXSPECAN_VAL_SPECTRUM_AVERAGING_ENABLED_FALSE (0) | The measurement is performed on a single acquisition. |
---|---|
RFMXSPECAN_VAL_SPECTRUM_AVERAGING_ENABLED_TRUE (1) | The measurement uses the averagingCount parameter to calculate the number of acquisitions over which the measurement is averaged. |
averagingCount | int32 | Specifies the number of acquisitions used for averaging when you set the averagingEnabled parameter to RFMXSPECAN_VAL_SPECTRUM_AVERAGING_ENABLED_TRUE. |
averagingType | int32 | Specifies the averaging type for averaging multiple spectrum acquisitions. The averaged spectrum is used for the measurement. Refer to the Averaging section of the Spectrum) topic for more information about averaging types. |
RFMXSPECAN_VAL_SPECTRUM_AVERAGING_TYPE_RMS (0) | The power spectrum is linearly averaged. RMS averaging reduces signal fluctuations but not the noise floor. |
---|---|
RFMXSPECAN_VAL_SPECTRUM_AVERAGING_TYPE_LOG (1) | The power spectrum is averaged in a logarithm scale. |
RFMXSPECAN_VAL_SPECTRUM_AVERAGING_TYPE_SCALAR (2) | The square root of the power spectrum is averaged. |
RFMXSPECAN_VAL_SPECTRUM_AVERAGING_TYPE_MAXIMUM (3) | The peak power in the spectrum at each frequency bin is retained from one acquisition to the next. |
RFMXSPECAN_VAL_SPECTRUM_AVERAGING_TYPE_MINIMUM (4) | The least power in the spectrum at each frequency bin is retained from one acquisition to the next. |
Name | Type | Description |
---|---|---|
status | int32 | 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 RFmx function to determine if an error has occurred. To obtain a text description of the status code and additional information about the error condition, call the RFmxSpecAn_GetError) function. The general meaning of the status code is as follows: |
Value | Meaning |
---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |
int32 __stdcall RFmxSpecAn_SpectrumCfgFFT (niRFmxInstrHandle instrumentHandle, char selectorString[], int32 FFTWindow, float64 FFTPadding);
Configures window and FFT to obtain a spectrum for the spectrum measurement.
Input | ||
---|---|---|
Name | Type | Description |
instrumentHandle | niRFmxInstrHandle | Identifies the RFmx session. You can obtain this parameter from the RFmxSpecAn_Initialize) function. |
selectorString | char[] | Comprises the signal name. If you do not specify the signal name, the default signal instance is used. Example: "" "signal::sig1" You can use the RFmxSpecAn_BuildSignalString) function to build the selector string). |
FFTWindow | int32 | Specifies the FFT window type to use to reduce spectral leakage. Refer to the Window and FFT section of the Spectrum) topic for more information about FFT window types. |
RFMXSPECAN_VAL_SPECTRUM_FFT_WINDOW_NONE (0) | Analyzes transients for which duration is shorter than the window length. You can also use this window type to separate two tones with frequencies close to each other but with almost equal amplitudes. |
---|---|
RFMXSPECAN_VAL_SPECTRUM_FFT_WINDOW_FLAT_TOP (1) | Measures single-tone amplitudes accurately. |
RFMXSPECAN_VAL_SPECTRUM_FFT_WINDOW_HANNING (2) | Analyzes transients for which duration is longer than the window length. You can also use this window type to provide better frequency resolution for noise measurements. |
RFMXSPECAN_VAL_SPECTRUM_FFT_WINDOW_HAMMING (3) | Analyzes closely-spaced sine waves. |
RFMXSPECAN_VAL_SPECTRUM_FFT_WINDOW_GAUSSIAN (4) | Provides a good balance of spectral leakage, frequency resolution, and amplitude attenuation. Hence, this windowing is useful for time-frequency analysis. |
RFMXSPECAN_VAL_SPECTRUM_FFT_WINDOW_BLACKMAN (5) | Analyzes single tone because it has a low maximum side lobe level and a high side lobe roll-off rate. |
RFMXSPECAN_VAL_SPECTRUM_FFT_WINDOW_BLACKMAN_HARRIS (6) | Useful as a good general purpose window, having side lobe rejection >90dB and having a moderately wide main lobe. |
RFMXSPECAN_VAL_SPECTRUM_FFT_WINDOW_KAISER_BESSEL (7) | Separates two tones with frequencies close to each other but with widely-differing amplitudes. |
FFTPadding | float64 | Specifies the factor by which the time-domain waveform is zero-padded before FFT. The FFT size is given by the following formula: waveform size * padding. This parameter is used only when the acquisition span is less than the device instantaneous bandwidth of the device. |
Name | Type | Description |
---|---|---|
status | int32 | 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 RFmx function to determine if an error has occurred. To obtain a text description of the status code and additional information about the error condition, call the RFmxSpecAn_GetError) function. The general meaning of the status code is as follows: |
Value | Meaning |
---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |
int32 __stdcall RFmxSpecAn_SpectrumCfgNoiseCompensationEnabled (niRFmxInstrHandle instrumentHandle, char selectorString[], int32 noiseCompensationEnabled);
Configures compensation of the spectrum for the inherent noise floor of the signal analyzer.
Input | ||
---|---|---|
Name | Type | Description |
instrumentHandle | niRFmxInstrHandle | Identifies the RFmx session. You can obtain this parameter from the RFmxSpecAn_Initialize) function. |
selectorString | char[] | Comprises the signal name. If you do not specify the signal name, the default signal instance is used. Example: "" "signal::sig1" You can use the RFmxSpecAn_BuildSignalString) function to build the selector string). |
noiseCompensationEnabled | int32 |
Specifies whether to enable compensation of the channel powers for the inherent noise floor of the signal analyzer. Supported Devices: PXIe-5663/5665/5668, PXIe-5830/5831/5832 |
RFMXSPECAN_VAL_SPECTRUM_NOISE_COMPENSATION_ENABLED_FALSE (0) | Disables compensation of the spectrum for the noise floor of the signal analyzer. |
---|---|
RFMXSPECAN_VAL_SPECTRUM_NOISE_COMPENSATION_ENABLED_TRUE (1) | Enables compensation of the spectrum for the noise floor of the signal analyzer. The noise floor of the signal analyzer is measured for the RF path used by the Spectrum measurement and cached for future use. If signal analyzer or measurement parameters change, noise floors are measured again. |
Name | Type | Description |
---|---|---|
status | int32 | 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 RFmx function to determine if an error has occurred. To obtain a text description of the status code and additional information about the error condition, call the RFmxSpecAn_GetError) function. The general meaning of the status code is as follows: |
Value | Meaning |
---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |
int32 __stdcall RFmxSpecAn_SpectrumCfgDetector (niRFmxInstrHandle instrumentHandle, char selectorString[], int32 detectorType, int32 detectorPoints);
Configures the detector settings, including detector type and the number of points to be detected.
Input | ||
---|---|---|
Name | Type | Description |
instrumentHandle | niRFmxInstrHandle | Identifies the RFmx session. You can obtain this parameter from the RFmxSpecAn_Initialize) function. |
selectorString | char[] | Comprises the signal name. If you do not specify the signal name, the default signal instance is used. Example: "" "signal::sig1" You can use the RFmxSpecAn_BuildSignalString) function to build the selector string). |
detectorType | int32 | Specifies the type of detector to be used. |
RFMXSPECAN_VAL_SPECTRUM_DETECTOR_TYPE_NONE (0) | The detector is disabled. |
---|---|
RFMXSPECAN_VAL_SPECTRUM_DETECTOR_TYPE_SAMPLE (1) | The central point in the bucket is detected. |
RFMXSPECAN_VAL_SPECTRUM_DETECTOR_TYPE_NORMAL (2) | The maximum and minimum values of the samples are detected in alternate buckets. |
RFMXSPECAN_VAL_SPECTRUM_DETECTOR_TYPE_PEAK (3) | The maximum value of the samples in the bucket is detected. |
RFMXSPECAN_VAL_SPECTRUM_DETECTOR_TYPE_NEGATIVE_PEAK (4) | The minimum value of the samples in the bucket is detected. |
RFMXSPECAN_VAL_SPECTRUM_DETECTOR_TYPE_AVERAGE_RMS (5) | The average RMS of all the samples in the bucket is detected. |
RFMXSPECAN_VAL_SPECTRUM_DETECTOR_TYPE_AVERAGE_VOLTAGE (6) | The average voltage of all the samples in the bucket is detected. |
RFMXSPECAN_VAL_SPECTRUM_DETECTOR_TYPE_AVERAGE_LOG (7) | The average log of all the samples in the bucket is detected. |
detectorPoints | int32 | Specifies the number of points after the detector is applied. |
Name | Type | Description |
---|---|---|
status | int32 | 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 RFmx function to determine if an error has occurred. To obtain a text description of the status code and additional information about the error condition, call the RFmxSpecAn_GetError) function. The general meaning of the status code is as follows: |
Value | Meaning |
---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |
int32 __stdcall RFmxSpecAn_SpectrumCfgVBWFilter (niRFmxInstrHandle instrumentHandle, char selectorString[], int32 VBWAuto, float64 VBW, float64 VBWToRBWRatio);
Configures the VBW settings including VBW Auto, VBW(Hz) and VBW to RBW ratio.
Input | ||
---|---|---|
Name | Type | Description |
instrumentHandle | niRFmxInstrHandle | Identifies the RFmx session. You can obtain this parameter from the RFmxSpecAn_Initialize) function. |
selectorString | char[] | Comprises the signal name. If you do not specify the signal name, the default signal instance is used. Example: "" "signal::sig1" You can use the RFmxSpecAn_BuildSignalString) function to build the selector string). |
VBWAuto | int32 | Specifies whether the VBW is expressed directly or computed based on VBW to RBW ratio. This value is expressed in Hz. |
RFMXSPECAN_VAL_SPECTRUM_VBW_FILTER_AUTO_BANDWIDTH_False (0) | Specify the video bandwidth in the VBW parameter. The VBWToRBWRatio parameter is disregarded in this mode. |
---|---|
RFMXSPECAN_VAL_SPECTRUM_VBW_FILTER_AUTO_BANDWIDTH_True (1) | Specify video bandwidth in terms of the VBW to RBW ratio. The value of the video bandwidth is then computed by using the RFMXSPECAN_ATTR_SPECTRUM_VBW_FILTER_VBW_TO_RBW_RATIO attribute and the RFMXSPECAN_ATTR_SPECTRUM_RBW_FILTER_AUTO_BANDWIDTH attribute. The value of the VBW parameter is disregarded in this mode. |
VBW | float64 | Specifies the video bandwidth when you set the VBWAuto parameter RFMXSPECAN_VAL_SPECTRUM_VBW_FILTER_AUTO_BANDWIDTH_False. This value is expressed in Hz. |
VBWToRBWRatio | float64 | Specifies the VBW to RBW Ratio when you set the VBWAuto parameter to RFMXSPECAN_VAL_SPECTRUM_VBW_FILTER_AUTO_BANDWIDTH_True. |
Name | Type | Description |
---|---|---|
status | int32 | 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 RFmx function to determine if an error has occurred. To obtain a text description of the status code and additional information about the error condition, call the RFmxSpecAn_GetError) function. The general meaning of the status code is as follows: |
Value | Meaning |
---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |
int32 __stdcall RFmxSpecAn_SpectrumValidateNoiseCalibrationData (niRFmxInstrHandle instrumentHandle, char selectorString[], int32* noiseCalibrationDataValid);
Indicates whether calibration data is valid for the configuration specified by the signal name in the selectorString parameter.
Input | ||
---|---|---|
Name | Type | Description |
instrumentHandle | niRFmxInstrHandle | Identifies the RFmx session. You can obtain this parameter from the RFmxSpecAn_Initialize) function. |
selectorString | char[] | Comprises the signal name. If you do not specify the signal name, the default signal instance is used. Example: "" "signal::sig1" You can use the RFmxSpecAn_BuildSignalString) function to build the selector string). |
Output | ||
Name | Type | Description |
noiseCalibrationDataValid | int32* | Returns whether the calibration data is valid. |
Name | Type | Description |
---|---|---|
status | int32 | 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 RFmx function to determine if an error has occurred. To obtain a text description of the status code and additional information about the error condition, call the RFmxSpecAn_GetError) function. The general meaning of the status code is as follows: |
Value | Meaning |
---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |