NI RFmx SpecAn OBW Configuration Functions - ni/grpc-device GitHub Wiki

OBW Configuration Functions

RFmxSpecAn_OBWCfgSpan

int32 __stdcall RFmxSpecAn_OBWCfgSpan (niRFmxInstrHandle instrumentHandle, char selectorString[], float64 span);

Purpose

Configures the frequency range, in Hz, around the center frequency, to acquire for the measurement.

Parameters

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 Hz, around the center frequency, to acquire for the measurement.

Return Value

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

RFmxSpecAn_OBWCfgBandwidthPercentage

int32 __stdcall RFmxSpecAn_OBWCfgBandwidthPercentage (niRFmxInstrHandle instrumentHandle, char selectorString[], float64 bandwidthPercentage);

Purpose

Configures the percentage of the total power that is contained in the occupied bandwidth (OBW).

Parameters

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).
bandwidthPercentage float64 Specifies the percentage of the total power that is contained in the OBW.

Return Value

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

RFmxSpecAn_OBWCfgPowerUnits

int32 __stdcall RFmxSpecAn_OBWCfgPowerUnits (niRFmxInstrHandle instrumentHandle, char selectorString[], int32 powerUnits);

Purpose

Configures the units for the absolute power.

Parameters

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).
powerUnits int32 Specifies the units for the absolute power.
RFMXSPECAN_VAL_OBW_POWER_UNITS_DBM (0) The absolute powers are reported in dBm.
RFMXSPECAN_VAL_OBW_POWER_UNITS_DBM_PER_HZ (1) The absolute powers are reported in dBm/Hz.

Return Value

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

RFmxSpecAn_OBWCfgRBWFilter

int32 __stdcall RFmxSpecAn_OBWCfgRBWFilter (niRFmxInstrHandle instrumentHandle, char selectorString[], int32 RBWAuto, float64 RBW, int32 RBWFilterType);

Purpose

Configures the resolution bandwidth (RBW) filter.

Parameters

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_OBW_RBW_AUTO_FALSE (0) The measurement uses the RBW that you specify in the RBW parameter.
RFMXSPECAN_VAL_OBW_RBW_AUTO_TRUE (1) The measurement computes the RBW.
RBW float64 Specifies the bandwidth, in Hz, of the RBW filter used to sweep the acquired carrier signal, when you set the RBWAuto parameter to RFMXSPECAN_VAL_OBW_RBW_AUTO_FALSE.
RBWFilterType int32 Specifies the shape of the digital RBW filter.
RFMXSPECAN_VAL_OBW_RBW_FILTER_TYPE_FFT_BASED (0) No RBW filtering is performed.
RFMXSPECAN_VAL_OBW_RBW_FILTER_TYPE_GAUSSIAN (1) An RBW filter with a Gaussian response is applied.
RFMXSPECAN_VAL_OBW_RBW_FILTER_TYPE_FLAT (2) An RBW filter with a flat response is applied.
RFMXSPECAN_VAL_OBW_RBW_FILTER_TYPE_SYNCH_TUNED_4 (3) An RBW filter with a 4-pole synchronously-tuned response is applied.
RFMXSPECAN_VAL_OBW_RBW_FILTER_TYPE_SYNCH_TUNED_5 (4) An RBW filter with a 5-pole synchronously-tuned response is applied.

Return Value

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

RFmxSpecAn_OBWCfgSweepTime

int32 __stdcall RFmxSpecAn_OBWCfgSweepTime (niRFmxInstrHandle instrumentHandle, char selectorString[], int32 sweepTimeAuto, float64 sweepTimeInterval);

Purpose

Configures the sweep time.

Parameters

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_OBW_SWEEP_TIME_AUTO_FALSE (0) The measurement uses the sweep time that you specify in the sweepTimeInterval parameter.
RFMXSPECAN_VAL_OBW_SWEEP_TIME_AUTO_TRUE (1) The measurement calculates the sweep time based on the value of the RFMXSPECAN_ATTR_OBW_RBW_FILTER_BANDWIDTH) attribute.
sweepTimeInterval float64 Specifies the sweep time, in seconds, when you set the sweepTimeAuto parameter to RFMXSPECAN_VAL_OBW_SWEEP_TIME_AUTO_FALSE.

Return Value

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

RFmxSpecAn_OBWCfgAveraging

int32 __stdcall RFmxSpecAn_OBWCfgAveraging (niRFmxInstrHandle instrumentHandle, char selectorString[], int32 averagingEnabled, int32 averagingCount, int32 averagingType);

Purpose

Configures averaging for the occupied bandwidth (OBW) measurement.

Parameters

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_OBW_AVERAGING_ENABLED_FALSE (0) The measurement is performed on a single acquisition.
RFMXSPECAN_VAL_OBW_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_OBW_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_OBW_AVERAGING_TYPE_RMS (0) The power spectrum is linearly averaged. RMS averaging reduces signal fluctuations but not the noise floor.
RFMXSPECAN_VAL_OBW_AVERAGING_TYPE_LOG (1) The power spectrum is averaged in a logarithm scale.
RFMXSPECAN_VAL_OBW_AVERAGING_TYPE_SCALAR (2) The square root of the power spectrum is averaged.
RFMXSPECAN_VAL_OBW_AVERAGING_TYPE_MAXIMUM (3) The peak power in the spectrum at each frequency bin is retained from one acquisition to the next.
RFMXSPECAN_VAL_OBW_AVERAGING_TYPE_MINIMUM (4) The least power in the spectrum at each frequency bin is retained from one acquisition to the next.

Return Value

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

RFmxSpecAn_OBWCfgFFT

int32 __stdcall RFmxSpecAn_OBWCfgFFT (niRFmxInstrHandle instrumentHandle, char selectorString[], int32 FFTWindow, float64 FFTPadding);

Purpose

Configures window and FFT to obtain a spectrum for the occupied bandwidth (OBW) measurement.

Parameters

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_OBW_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_OBW_FFT_WINDOW_FLAT_TOP (1) Measures single-tone amplitudes accurately.
RFMXSPECAN_VAL_OBW_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_OBW_FFT_WINDOW_HAMMING (3) Analyzes closely-spaced sine waves.
RFMXSPECAN_VAL_OBW_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_OBW_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_OBW_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_OBW_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.

Return Value

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
⚠️ **GitHub.com Fallback** ⚠️