Configures window and FFT to obtain a spectrum for the spectrum measurement.

Syntax

int32 __stdcall RFmxSpecAn_SpectrumCfgFFT(niRFmxInstrHandle instrumentHandle, char selectorString[], int32 fftWindow, float64 fftPadding)

Parameters

NameDirectionTypeDescription
instrumentHandle[in]niRFmxInstrHandle

This parameter specifies the RFmx session refnum. Instrument Handle In is obtained from the RFmxInstr_Initialize function.

selectorString[in]char

This parameter specifies a Selector String comprising of the signal name. If you do not specify the signal name, the default signal instance is used. The default value is "" (empty string).
Example:
""
"signal::sig1"
You can use the RFmxSpecAn_BuildSignalString function to build the selector string.

fftWindow[in]int32

This parameter specifies the FFT window type to use to reduce spectral leakage. Refer to the Window and FFT section of the Spectral Measurements Concepts topic for more information about FFT window types. The default value is Flat Top.

Name

Value

Description

RFMXSPECAN_VAL_SPECTRUM_FFT_WINDOW_NONE

0 (0x0)

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 (0x1)

Measures single-tone amplitudes accurately.

RFMXSPECAN_VAL_SPECTRUM_FFT_WINDOW_HANNING

2 (0x2)

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 (0x3)

Analyzes closely-spaced sine waves.

RFMXSPECAN_VAL_SPECTRUM_FFT_WINDOW_GAUSSIAN

4 (0x4)

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 (0x5)

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 (0x6)

Useful as a good general purpose window, having side lobe rejection greater than 90 dB and having a moderately wide main lobe.

RFMXSPECAN_VAL_SPECTRUM_FFT_WINDOW_KAISER_BESSEL

7 (0x7)

Separates two tones with frequencies close to each other but with widely-differing amplitudes.

fftPadding[in]float64

This parameter specifies the factor by which the time-domain waveform is zero-padded before an FFT. The FFT size is given by the following formula: FFT size = waveform size * padding. This parameter is used only when the acquisition span is less than the device instantaneous bandwidth. The default value is -1.

Returns

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