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

CHP Configuration Functions

RFmxSpecAn_CHPCfgSpan

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

Purpose

Configures the frequency range, in Hz, around the center frequency, to acquire for the CHP 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_CHPCfgIntegrationBandwidth

int32 __stdcall RFmxSpecAn_CHPCfgIntegrationBandwidth (niRFmxInstrHandle instrumentHandle, char selectorString[], float64 integrationBandwidth);

Purpose

Configures the frequency range, in Hz, over which the measurement integrates the power.

Use "carrier<n>" as the selector string to configure this function.

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 and carrier number. If you do not specify the signal name, the default signal instance is used.

Example:

"carrier0"

"signal::sig1/carrier0"

You can use the RFmxSpecAn_BuildCarrierString2) function to build the selector string).
integrationBandwidth float64 Specifies the frequency range, in Hz, over which the measurement integrates the carrier power.

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_CHPCfgRRCFilter

int32 __stdcall RFmxSpecAn_CHPCfgRRCFilter (niRFmxInstrHandle instrumentHandle, char selectorString[], int32 RRCFilterEnabled, float64 RRCAlpha);

Purpose

Configures the root raised cosine (RRC) filter to apply on the channel before measuring the channel power.

Use "carrier<n>" as the selector string to configure this function.

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 and carrier number. If you do not specify the signal name, the default signal instance is used.

Example:

"carrier0"

"signal::sig1/carrier0"

You can use the RFmxSpecAn_BuildCarrierString2) function to build the selector string).
RRCFilterEnabled int32 Specifies whether to apply the root-raised-cosine (RRC) filter on the acquired carrier channel before measuring the carrier channel power.
RFMXSPECAN_VAL_CHP_RRC_FILTER_ENABLED_FALSE (0) The measurement measures the channel power directly on the acquired channel.
RFMXSPECAN_VAL_CHP_RRC_FILTER_ENABLED_TRUE (1) The measurement applies the RRC filter on the acquired channel before measuring the channel power.
RRCAlpha float64 Specifies the roll-off factor for the root-raised-cosine (RRC) filter.

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_CHPCfgNumberOfCarriers

int32 __stdcall RFmxSpecAn_CHPCfgNumberOfCarriers (niRFmxInstrHandle instrumentHandle, char selectorString[], int32 numberOfCarriers);

Purpose

Configures the number of carriers for a channel power (CHP) 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).
numberOfCarriers int32 Specifies the number of carriers.

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_CHPCfgCarrierOffset

int32 __stdcall RFmxSpecAn_CHPCfgCarrierOffset (niRFmxInstrHandle instrumentHandle, char selectorString[], float64 carrierFrequency);

Purpose

Configures the center frequency of the carrier, relative to the RF center frequency.

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 and carrier number. If you do not specify the signal name, the default signal instance is used.

Example:

"carrier0"

"signal::sig1/carrier0"

You can use the RFmxSpecAn_BuildCarrierString2) function to build the selector string).
carrierFrequency float64 Specifies the center frequency, in Hz, of the carrier, relative to the RF center frequency.

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_CHPValidateNoiseCalibrationData

int32 __stdcall RFmxSpecAn_CHPValidateNoiseCalibrationData (niRFmxInstrHandle instrumentHandle, char selectorString[], int32* noiseCalibrationDataValid);

Purpose

Indicates whether calibration data is valid for the configuration specified by the signal name in the selectorString parameter.

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).
Output
Name Type Description
noiseCalibrationDataValid int32* Returns whether the calibration data is valid.

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_CHPCfgRBWFilter

int32 __stdcall RFmxSpecAn_CHPCfgRBWFilter (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 CHP) topic for more information about RBW and sweep time.
RFMXSPECAN_VAL_CHP_RBW_AUTO_FALSE (0) The measurement uses the RBW that you specify in the RBW parameter.
RFMXSPECAN_VAL_CHP_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_CHP_RBW_AUTO_FALSE.
RBWFilterType int32 Specifies the shape of the digital RBW filter.
RFMXSPECAN_VAL_CHP_RBW_FILTER_TYPE_FFT_BASED (0) No RBW filtering is performed.
RFMXSPECAN_VAL_CHP_RBW_FILTER_TYPE_GAUSSIAN (1) An RBW filter with a Gaussian response is applied.
RFMXSPECAN_VAL_CHP_RBW_FILTER_TYPE_FLAT (2) An RBW filter with a flat response is applied.
RFMXSPECAN_VAL_CHP_RBW_FILTER_TYPE_SYNCH_TUNED_4 (3) An RBW filter with a 4-pole synchronously-tuned response is applied.
RFMXSPECAN_VAL_CHP_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_CHPCfgSweepTime

int32 __stdcall RFmxSpecAn_CHPCfgSweepTime (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_CHP_SWEEP_TIME_AUTO_FALSE (0) The measurement uses the sweep time that you specify in the sweepTimeInterval parameter.
RFMXSPECAN_VAL_CHP_SWEEP_TIME_AUTO_TRUE (1) The measurement calculates the sweep time based on the value of the RFMXSPECAN_ATTR_CHP_RBW_FILTER_BANDWIDTH) attribute.
sweepTimeInterval float64 Specifies the sweep time, in seconds, when you set the sweepTimeAuto parameter to RFMXSPECAN_VAL_CHP_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_CHPCfgAveraging

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

Purpose

Configures averaging for the channel power (CHP) 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_CHP_AVERAGING_ENABLED_FALSE (0) The measurement is performed on a single acquisition.
RFMXSPECAN_VAL_CHP_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_CHP_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_CHP_AVERAGING_TYPE_RMS (0) The power spectrum is linearly averaged. RMS averaging reduces signal fluctuations but not the noise floor.
RFMXSPECAN_VAL_CHP_AVERAGING_TYPE_LOG (1) The power spectrum is averaged in a logarithm scale.
RFMXSPECAN_VAL_CHP_AVERAGING_TYPE_SCALAR (2) The square root of the power spectrum is averaged.
RFMXSPECAN_VAL_CHP_AVERAGING_TYPE_MAXIMUM (3) The peak power in the spectrum at each frequency bin is retained from one acquisition to the next.
RFMXSPECAN_VAL_CHP_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_CHPCfgFFT

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

Purpose

Configures window and FFT to obtain a spectrum for the channel power (CHP) 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_CHP_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_CHP_FFT_WINDOW_FLAT_TOP (1) Measures single-tone amplitudes accurately.
RFMXSPECAN_VAL_CHP_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_CHP_FFT_WINDOW_HAMMING (3) Analyzes closely-spaced sine waves.
RFMXSPECAN_VAL_CHP_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_CHP_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_CHP_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_CHP_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** ⚠️