niRFSA_ReadPowerSpectrumF64

NI RF Vector Signal Analyzers

niRFSA_ReadPowerSpectrumF64

ViStatus = niRFSA_ReadPowerSpectrumF64( ViSession vi, ViConstString channelList, ViReal64 timeout, ViReal64 powerSpectrumData[], ViInt32 dataArraySize, niRFSA_spectrumInfo* spectrumInfo);

Purpose

Initiates a spectrum acquisition and returns power spectrum data.

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the niRFSA_init or the niRFSA_initWithOptions functions and identifies a particular instrument session.
channelList ViConstString Specifies channels from which to fetch data.
timeout ViReal64 Specifies in seconds the time allotted for the function to complete before returning a timeout error. A value of -1 specifies the function waits until all data is available.
dataArraySize ViInt64 Specifies the size of the array you specify for the powerSpectrumData parameter. Use the niRFSA_GetNumberOfSpectralLines function to learn the array size you need to allocate. The array must be at least as large as the number of spectral lines that NI-RFSA computes for the power spectrum.
Output
Name Type Description
powerSpectrumData[] ViReal64 Returns power spectrum data.
spectrumInfo niRFSA_spectrumInfo* Returns additional information about the powerSpectrumData array. This information includes the frequency corresponding to the first element in the array, the frequency increment between adjacent array elements, and the number of spectral lines the function returned.

Return Value

Name Type Description
status ViStatus Returns the status code of this operation. The status code either indicates success or describes an error or warning condition. You examine the status code from each call to an instrument driver function to determine if an error occurred.

To obtain a text description of the status code, call the niRFSA_error_message function. To obtain additional information about the error condition, call the niRFSA_GetError function. To clear the error information from the driver, 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