niWLANA_RFSAConfigureHardware
- Updated2023-02-21
- 3 minute(s) read
int32 __stdcall niWLANA_RFSAConfigureHardware (niWLANAnalysisSession session, ViSession rfsaSession, char hwChannelString[], int64 *samplesPerRecord);
Purpose
Configures NI-RFSAs for either I/Q acquisition or spectral acquisition depending on the type of WLAN measurement you specify.
The niWLANA_RFSAConfigureHardware function sets the NIWLANA_DEVICE_INSTANTANEOUS_BANDWIDTH attribute according the device in use as listed below:
- 200 MHz, if you are using PXIe-5646
- 80 MHz, if you are using PXIe-5644/PXIe-5645
- 1 GHz, if you are using PXIe-5840/PXIe-5841/PXIe-5841 with PXIe-5655/PXIe-5820/PXIe-5830/PXIe-5831
- The value read from the RFSA Max Device Instantaneous Bandwidth attribute, if you are using PXIe-5665
- If you are using PXIe-5668,
NI-RFSA IQ Carrier Frequency Bandwidth Option Acquisition Bitfile Device Instantaneous Bandwidth Entire range 80 MHz 400 MHz/800 MHz 80 MHz Entire range 200 MHz 400 MHz/800 MHz 200 MHz = 3.6 GHz 320 MHz/765 MHz 400 MHz/800 MHz 320 MHz > 3.6 GHz 320 MHz/765 MHz 400 MHz 400 MHz > 3.6 GHz 320 MHz/765 MHz 800 MHz 765 MHz - 50 MHz, if you are using any other NI-RFSA device
If the NIWLANA_RECOMMENDED_ACQUISITION_TYPE attribute returns NIWLANA_VAL_ACQUISITION_TYPE_IQ, this function configures NI-RFSA device to acquire I/Q samples and completes the following tasks:
- Sets the NIRFSA_ATTR_ACQUISITION_TYPE attribute to NIRFSA_VAL_IQ.
- Sets the NIRFSA_ATTR_IQ_RATE attribute to the value of the NIWLANA_RECOMMENDED_IQ_SAMPLING_RATE attribute value.
- Sets the NIRFSA_ATTR_NUMBER_OF_SAMPLES_IS_FINITE attribute to VI_TRUE.
- Retrieves the coerced NIRFSA_ATTR_IQ_RATE attribute, multiplies this value by the value of the NIWLANA_RECOMMENDED_ACQUISITION_LENGTH attribute, and sets the NIRFSA_ATTR_NUMBER_OF_SAMPLES attribute to the result.
- Sets the NIRFSA_ATTR_NUMBER_OF_RECORDS_IS_FINITE attribute to VI_TRUE.
- Sets the NIRFSA_ATTR_NUMBER_OF_RECORDS attribute to the value of the NIWLANA_RECOMMENDED_NUMBER_OF_RECORDS attribute value.
- Retrieves the coerced NIRFSA_ATTR_IQ_RATE attribute, multiplies this value by the value of the NIWLANA_RECOMMENDED_IQ_PRE_TRIGGER_DELAY attribute, and sets the NIRFSA_ATTR_REF_TRIGGER_PRETRIGGER_SAMPLES attribute to the result.
- If you set the NIRFSA_ATTR_REF_TRIGGER_TYPE attribute to NIRFSA_VAL_IQ_POWER_EDGE, this function sets the NIRFSA_ATTR_REF_TRIGGER_MINIMUM_QUIET_TIME attribute to the value of the NIWLANA_RECOMMENDED_MINIMUM_QUIET_TIME attribute. If you set the NIRFSA_ATTR_REF_TRIGGER_TYPE attribute to any other value, this function sets the NIRFSA_ATTR_REF_TRIGGER_MINIMUM_QUIET_TIME attribute to 0.
- Sets the NIRFSA_ALLOW_MORE_RECORDS_THAN_MEMORY attribute to VI_TRUE.
If the NIWLANA_RECOMMENDED_ACQUISITION_TYPE attribute returns NIWLANA_VAL_ACQUISITION_TYPE_SPECTRUM and you set the NIWLANA_GATED_SPECTRUM_ENABLED attribute to NIWLANA_VAL_TRUE, this function configures NI-RFSA device to acquire I/Q samples and completes the following tasks:
- Sets the NIRFSA_ATTR_ACQUISITION_TYPE attribute to NIRFSA_VAL_IQ.
- If you set the NIRFSA_ATTR_REF_TRIGGER_TYPE attribute to NIRFSA_VAL_IQ_POWER_EDGE, this function sets the NIRFSA_ATTR_REF_TRIGGER_MINIMUM_QUIET_TIME attribute to the value of the NIWLANA_RECOMMENDED_MINIMUM_QUIET_TIME attribute. If you set the NIRFSA_ATTR_REF_TRIGGER_TYPE attribute to any other value, this function sets the NIRFSA_ATTR_REF_TRIGGER_MINIMUM_QUIET_TIME attribute to 0.
- Sets the NIRFSA_ATTR_NUMBER_OF_RECORDS_IS_FINITE attribute to VI_TRUE.
- Sets the NIRFSA_ATTR_NUMBER_OF_RECORDS attribute to the value of the NIWLANA_RECOMMENDED_NUMBER_OF_RECORDS attribute.
- Sets the NIRFSA_ALLOW_MORE_RECORDS_THAN_MEMORY attribute to VI_TRUE.
- Sets the NIRFSA_ATTR_REF_TRIGGER_PRETRIGGER_SAMPLES attribute to 0.
If the NIWLANA_RECOMMENDED_ACQUISITION_TYPE attribute returns NIWLANA_VAL_ACQUISITION_TYPE_SPECTRUM and you set the NIWLANA_GATED_SPECTRUM_ENABLED attribute to NIWLANA_VAL_FALSE, this function configures NI-RFSA to compute a power spectrum and completes the following tasks:
- Sets the NIRFSA_ATTR_ACQUISITION_TYPE attribute to NIRFSA_VAL_SPECTRUM.
- Sets the NIRFSA_ATTR_SPECTRUM_SPAN attribute to the value of the NIWLANA_RECOMMENDED_SPECTRUM_SPAN attribute.
- Sets the NIRFSA_ATTR_POWER_SPECTRUM_UNITS attribute to NIRFSA_VAL_VOLTS_SQUARED.
- Sets the NIRFSA_ATTR_RESOLUTION_BANDWIDTH_TYPE attribute to NIRFSA_VAL_RBW_3DB, NIRFSA_VAL_RBW_6DB, NIRFSA_VAL_RBW_BIN_WIDTH, or NIRFSA_VAL_RBW_ENBW depending on the NIWLANA_RECOMMENDED_SPECTRUM_RBW_DEFINITION attribute.
- Sets the NIRFSA_ATTR_RESOLUTION_BANDWIDTH attribute to the value of the NIWLANA_RECOMMENDED_SPECTRUM_RBW attribute.
- Sets the NIRFSA_ATTR_SPECTRUM_AVERAGING_MODE attribute to NIRFSA_VAL_RMS_AVERAGING.
- Sets the NIRFSA_ATTR_SPECTRUM_NUMBER_OF_AVERAGES attribute to the value of the NIWLANA_RECOMMENDED_NUMBER_OF_RECORDS attribute.
- Sets the NIRFSA_ATTR_FFT_WINDOW_TYPE attribute to the value returned by the NIWLANA_RECOMMENDED_SPECTRUM_FFT_WINDOW_TYPE attribute.
- Retrieves the spectrumInfo cluster using the niRFSA_GetSpectralInfoForSMT function and sets the NIWLANA_FFT_WINDOW_SIZE attribute and the niRFSA_GetSpectralInfoForSMT function and sets the NIWLANA_FFT_SIZE attribute respectively, to the window size and FFT size elements of the spectralInfo cluster.
This function calls the niWLANA_RFSAConfigureExternalGain function to configure the NIRFSA_ATTR_EXTERNAL_GAIN attribute according to the specified amplitude correction table for the NI RF vector signal analyzer.
This function calls the niWLANA_RFSAReadDeviceState function read the state of the NI RF vector signal analyzer like model name, LO frequency, temperature, etc., if you set the NIWLANA_NOISE_COMPENSATION_ENABLED attribute to NIWLANA_VAL_TRUE.
Parameters
Input | ||
Name | Type | Description |
session | niWLANAnalysisSession | Specifies the niWLAN analysis session refnum. |
rfsaSession | ViSession | Identifies the instrument session. The toolkit obtains this parameter from the niRFSA_init function or niRFSA_InitWithOptions function. |
hwChannelString | char[] | Specifies the RFSA device channel. Set this parameter to "" (empty string) or NULL. |
Output | ||
Name | Type | Description |
samplesPerRecord | int64* | Returns the number of samples per record configured for the NI-RFSA session. |
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 niWLAN 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 niWLANA_GetErrorString function. The general meaning of the status code is as follows:
|
||||||||