RFmx Instr CVI

RFmxInstr_FetchRawIQData

  • Updated2024-10-14
  • 2 minute(s) read

RFmxInstr_FetchRawIQData

int32 __stdcall RFmxInstr_FetchRawIQData ( niRFmxInstrHandle instrumentHandle, char selectorString[], float64 timeout, int32 recordsToFetch, int64 samplesToRead, float64* x0, float64* dx, NIComplexSingle data[], int32 arraySize, int32* actualArraySize, void* reserved)

Purpose

Fetches I/Q data from a single record in an acquisition.

Parameters

Input
Name Type Description
instrumentHandle niRFmxInstrHandle Identifies the instrument session. This parameter is obtained from the RFmxInstr_Initialize function or the RFmxInstr_InitializeFromNIRFSASessionArray function.
selectorString char[] Pass an empty string.
timeout float64 Specifies the timeout, in seconds, for fetching the raw IQ data. A value of -1 specifies that the function waits until all data is available. A value of 0 specifies the function immediately returns available data. The default value is 10.
recordsToFetch int32 Specifies the record to retrieve. Record numbers are zero-based. The default value is 0.
samplesToRead int64 Specifies the number of samples to fetch. A value of -1 specifies that RFmx fetches all samples. The default value is -1.
dx float64* Returns the time interval between data points in the acquired signal. The I/Q data sample rate is the reciprocal of this value.
arraySize int32 Specifies the size of the y array. Set the arraySize parameter to 0 to get the size of the Spectrum array in the actualArraySize parameter.
actualArraySize int32* Returns the actual size of the array, if you pass NULL to all output array parameters, and set the arraySize parameter to 0.
Output
Name Type Description
x0 float64* Returns the start time of the first sample. The timestamp corresponds to the difference, in seconds, between the returned first sample and the reference trigger location.
data NIComplexSingle[] Returns the complex-value time domain data array. The real and imaginary parts of this complex data array correspond to the in-phase (I) and quadrature-phase (Q) data, respectively. To calculate the instantaneous power of a sampled I/Q point, use the equation:(I^2 + Q^2) / (2R) where R is the input impedance in ohms. For RFmx, R = 50 ohms.
reserved void* Reserved for future use. Any value passed to this parameter will be ignored.

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 RFmxInstr_GetError function.

The general meaning of the status code is as follows:

Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

Log in to get a better experience