Returns the requested response type, based on current NI-RFSA settings. The PXI-5661 and PXIe-5663/5663E/5665/5667/5668 automatically corrects the IF and RF response when you set the Digital IF Equalization Enabled property to TRUE. If you are using external digitizer mode, you can use information returned from this VI to correct your measurement.

Syntax

ViStatus _VI_FUNC niRFSA_GetFrequencyResponse(ViSession vi, ViConstString channelList, ViInt32 bufferSize, ViReal64 frequencies[], ViReal64 magnitudeResponse[], ViReal64 phaseResponse[], ViInt32 *numberOfFrequencies)

Remarks

Refer to the Factory Calibration topic for your device for more information about frequency-response calibration.

Supported Devices: PXI-5600, PXIe-5601/5603/5605/5606 (external digitizer mode), PXI-5661, PXIe-5663/5663E/5665/5667/5668, PXIe-5693/5694/5698

Parameters

NameDirectionTypeDescription
vi[in]ViSession

Identifies your instrument session. vi is obtained from the niRFSA_Init or niRFSA_InitWithOptions function.

channelList[in]ViConstString

Identifies which channels to apply settings. Specify an empty string as the value of this parameter.

bufferSize[in]ViInt32

Specifies the size of the array you specify for the frequencies, magnitudeResponse, and phaseResponse parameters.

frequencies[in]ViReal64[]

Returns an array containing the frequencies, in hertz (Hz), that correspond to the response data.

Pass VI_NULL if you do not want to use this parameter.

magnitudeResponse[in]ViReal64[]

Returns an array containing the magnitude of the requested response, in decibels (dB). The magnitude response is normalized to the center frequency at each frequency in the frequencies array.

Pass VI_NULL if you do not want to use this parameter.

phaseResponse[in]ViReal64[]

Returns an array containing the phase of the requested response, in radians. The phase response is normalized to the center frequency at each frequency entry in the frequencies array.

Pass VI_NULL if you do not want to use this parameter. This array may contain zeros if the device does not contain a stored phase response in its calibration data.

numberOfFrequencies[out]ViInt32 *

Returns the required number of elements in the frequencies array and the response arrays. If bufferSize is 0, this parameter returns the expected array size. The expected array size depends on which NI-RFSA device you use (PXI-5661, PXIe-5663/5663E/5665) and on the current settings (PXIe-5663/5663E/5665 only).

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 NI-RFSA 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 niRFSA_GetError function. To clear the error information from NI-RFSA, call the niRFSA_ClearError function. The general meaning of the status code is as follows:

Value

Meaning

0

Success

Positive Values

Warnings

Negative Values

Errors