Skip to content

NI RFSA Acquisition Functions

Greg Stoll edited this page Nov 11, 2021 · 1 revision

Acquisition Functions

IQ Acquisition

niRFSA_Initiate

ViStatus niRFSA_Initiate(ViSession vi);

Purpose

Commits settings to hardware, waits for hardware settling, and starts an acquisition. You can use this function in conjunction with one of the niRFSA fetch I/Q functions to retrieve acquired I/Q data, or you can use the [niRFSA_ReadIQSingleRecordComplexF64](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_ReadIQSingleRecordComplexF64.html')) function to both initiate the acquisition and retrieve I/Q data at one time.

Note  If you are using external digitizer mode, this function commits settings and waits for settling, but it does not start an acquisition. Notice that using the [niRFSA_Commit](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_Commit.html')) function on its own commits settings to hardware, but the device does not wait for hardware settling.
Supported Devices: PXI-5600, PXIe-5601/5603/5605/5606 (external digitizer mode), PXIe-5644/5645/5646, PXI-5661, PXIe-5663/5663E/5665/5667/5668, PXIe-5693/5694/5698, PXIe-5820/5830/5831/5832/5840/5841

Related Topics

None (Trigger Type)

RF List Mode

[NI RF Vector Signal Analyzer State Diagram](javascript:LaunchMergedHelp('nirfsa.chm', 'PXIe-5668.chm', 'hardware-state-diagram.html'))

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the [niRFSA_init](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_init.html')) or [niRFSA_InitWithOptions](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_initWithOptions.html')) function.

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. 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](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_GetError.html')) function. To clear the error information from NI-RFSA, call the [niRFSA_ClearError](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_ClearError.html')) function.

The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

| :- | :- | :- |

Single Record Acquisition

niRFSA_FetchIQSingleRecordComplexI16

ViStatus niRFSA_FetchIQSingleRecordComplexI16(ViSession vi, ViConstString channelList, ViInt64 recordNumber, ViInt64 numberOfSamples, ViReal64 timeout, NIComplexI16 data[], niRFSA_wfmInfo* wfmInfo);

Purpose

Fetches binary I/Q data from a single record in an acquisition. The fetch transfers acquired waveform data from device memory to computer memory. The data was acquired to onboard memory previously by the hardware after the acquisition was initiated.

This function is not necessary if you use the [niRFSA_ReadIQSingleRecordComplexF64](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_ReadIQSingleRecordComplexF64.html')) function because the niRFSA_ReadIQSingleRecordComplexF64 function performs the fetch as part of the function.

Supported Devices: PXIe-5644/5645/5646, PXI-5661, PXIe-5663/5663E/5665/5667/5668, PXIe-5820/5830/5831/5832/5840/5841

Related Topics

None (Trigger Type)

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the [niRFSA_init](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_init.html')) or [niRFSA_InitWithOptions](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_initWithOptions.html')) function.
channelList ViConstString Identifies which channels to apply settings. Specify an empty string as the value of this parameter.
recordNumber ViInt64 Specifies the record to retrieve. Record numbers are zero-based.
numberOfSamples ViInt64 Specifies the number of samples to fetch. The value must specify the array size of the data parameter.
timeout ViReal64 PXI-5661, PXIe-5663/5665/5667—Specifies the time, in seconds, allotted for the function to complete before returning a timeout error.

PXIe-5644/5645/5646, PXIe-5668, PXIe-5820/5830/5831/5832/5840/5841—Specifies the time, in seconds, allotted to receive the reference trigger.
Note Note  For all supported devices, a value of –1 specifies the function waits until all data is available. A value of 0 specifies the function immediately returns available data.

| :- | :- | :- | |Output||| |Name|Type|Description| |data|NIComplexI16[]|Returns the acquired waveform. Allocate an NIComplexI16 array at least as large as numberOfSamples.| |wfmInfo|niRFSA_wfmInfo*|

Contains the absolute and relative timestamps for the operation, the time interval (dt), and the actual number of samples read.

The following list provides more information about each of these properties:

- absolute timestamp—Returns the timestamp, in seconds, of the first fetched sample that is comparable between records and acquisitions.

|
Note Note  The value of the absolute timestamp returned is always 0 for the PXIe-5644/5645/5646, PXIe-5668, and PXIe-5820/5830/5831/5832/5840/5841.
- relative timestamp—Returns a timestamp that corresponds to the difference, in seconds, between the first sample returned and the Reference Trigger location. The timestamp is zero if the Reference Trigger has not occurred.
Note Note  The value of the relative timestamp returned is always 0 for the PXIe-5644/5645/5646.

- dt—Returns the time interval between data points in the acquired signal. The I/Q data sample rate is the reciprocal of this value.

- actual samples read—Returns an integer representing the number of samples in the waveform.

- offset—Returns the offset to scale data, (b), in mx + b form.

- gain—Returns the gain to scale data, (m), in mx + b form.

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. 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](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_GetError.html')) function. To clear the error information from NI-RFSA, call the [niRFSA_ClearError](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_ClearError.html')) function.

The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

| :- | :- | :- |

niRFSA_FetchIQSingleRecordComplexF64

ViStatus niRFSA_FetchIQSingleRecordComplexF64(ViSession vi, ViConstString channelList, ViInt64 recordNumber, ViInt64 numberOfSamples, ViReal64 timeout, NIComplexNumber* data, niRFSA_wfmInfo* wfmInfo);

Purpose

Fetches I/Q data from a single record in an acquisition. The fetch transfers acquired waveform data from device memory to computer memory. The data was acquired to onboard memory previously by the hardware after the acquisition was initiated.

This function is not necessary if you use the [niRFSA_ReadIQSingleRecordComplexF64](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_ReadIQSingleRecordComplexF64.html')) function because the niRFSA_ReadIQSingleRecordComplexF64 function performs the fetch as part of the function.

Supported Devices: PXIe-5644/5645/5646, PXI-5661, PXIe-5663/5663E/5665/5667/5668, PXIe-5820/5830/5831/5832/5840/5841

Related Topics

None (Trigger Type)

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the [niRFSA_init](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_init.html')) or [niRFSA_InitWithOptions](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_initWithOptions.html')) function.
channelList ViConstString Identifies which channels to apply settings. Specify an empty string as the value of this parameter.
recordNumber ViInt64 Specifies the record to retrieve. Record numbers are zero-based.
numberOfSamples ViInt64 Specifies the number of samples to fetch. The value must specify the array size of the data parameter.
timeout ViReal64 PXI-5661, PXIe-5663/5665/5667—Specifies the time, in seconds, allotted for the function to complete before returning a timeout error.

PXIe-5644/5645/5646, PXIe-5668, PXIe-5820/5830/5831/5832/5840/5841—Specifies the time, in seconds, allotted to receive the reference trigger.
Note Note  For all supported devices, a value of –1 specifies the function waits until all data is available. A value of 0 specifies the function immediately returns available data.

| :- | :- | :- | |Output||| |Name|Type|Description| |data|NIComplexNumber*|Returns the acquired waveform. Allocate an NIComplexNumber array at least as large as numberOfSamples.| |wfmInfo|niRFSA_wfmInfo*|

Contains the absolute and relative timestamps for the operation, the time interval (dt), and the actual number of samples read.

The following list provides more information about each of these properties:

- absolute timestamp—Returns the timestamp, in seconds, of the first fetched sample that is comparable between records and acquisitions.

|
Note Note  The value of the absolute timestamp returned is always 0 for the PXIe-5644/5645/5646, PXIe-5668, and PXIe-5820/5830/5831/5832/5840/5841.
- relative timestamp—Returns a timestamp that corresponds to the difference, in seconds, between the first sample returned and the Reference Trigger location. The timestamp is zero if the Reference Trigger has not occurred.
Note Note  The value of the relative timestamp returned is always 0 for the PXIe-5644/5645/5646.

- dt—Returns the time interval between data points in the acquired signal. The I/Q data sample rate is the reciprocal of this value.

- actual samples read—Returns an integer representing the number of samples in the waveform.

- offset—Returns the offset to scale data, (b), in mx + b form.

- gain—Returns the gain to scale data, (m), in mx + b form.

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. 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](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_GetError.html')) function. To clear the error information from NI-RFSA, call the [niRFSA_ClearError](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_ClearError.html')) function.

The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

| :- | :- | :- |

niRFSA_FetchIQSingleRecordComplexF32

ViStatus niRFSA_FetchIQSingleRecordComplexF32(ViSession vi, ViConstString channelList, ViInt64 recordNumber, ViInt64 numberOfSamples, ViReal64 timeout, NIComplexNumber* data, niRFSA_wfmInfo* wfmInfo);

Purpose

Fetches I/Q data from a single record in an acquisition. The fetch transfers acquired waveform data from device memory to computer memory. The data was acquired to onboard memory previously by the hardware after the acquisition was initiated.

This function is not necessary if you use the [niRFSA_ReadIQSingleRecordComplexF64](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_ReadIQSingleRecordComplexF64.html')) function because the niRFSA_ReadIQSingleRecordComplexF64 function performs the fetch as part of the function.

Supported Devices: PXIe-5644/5645/5646, PXI-5661, PXIe-5663/5663E/5665/5667/5668, PXIe-5820/5830/5831/5832/5840/5841

Related Topics

None (Trigger Type)

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the [niRFSA_init](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_init.html')) or [niRFSA_InitWithOptions](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_initWithOptions.html')) function.
channelList ViConstString Identifies which channels to apply settings. Specify an empty string as the value of this parameter.
recordNumber ViInt64 Specifies the record to retrieve. Record numbers are zero-based.
numberOfSamples ViInt64 Specifies the number of samples to fetch. The value must specify the array size of the data parameter.
timeout ViReal64 PXI-5661, PXIe-5663/5665/5667—Specifies the time, in seconds, allotted for the function to complete before returning a timeout error.

PXIe-5644/5645/5646, PXIe-5668, PXIe-5820/5830/5831/5832/5840/5841—Specifies the time, in seconds, allotted to receive the reference trigger.
Note Note  For all supported devices, a value of –1 specifies the function waits until all data is available. A value of 0 specifies the function immediately returns available data.

| :- | :- | :- | |Output||| |Name|Type|Description| |data|NIComplexNumberF32*|Returns the acquired waveform. Allocate an NIComplexNumberF32 array at least as large as numberOfSamples.| |wfmInfo|niRFSA_wfmInfo*|

Contains the absolute and relative timestamps for the operation, the time interval (dt), and the actual number of samples read.

The following list provides more information about each of these properties:

- absolute timestamp—Returns the timestamp, in seconds, of the first fetched sample that is comparable between records and acquisitions.

|
Note Note  The value of the absolute timestamp returned is always 0 for the PXIe-5644/5645/5646, PXIe-5668, and PXIe-5820/5830/5831/5832/5840/5841.
- relative timestamp—Returns a timestamp that corresponds to the difference, in seconds, between the first sample returned and the Reference Trigger location. The timestamp is zero if the Reference Trigger has not occurred.
Note Note  The value of the relative timestamp returned is always 0 for the PXIe-5644/5645/5646.

- dt—Returns the time interval between data points in the acquired signal. The I/Q data sample rate is the reciprocal of this value.

- actual samples read—Returns an integer representing the number of samples in the waveform.

- offset—Returns the offset to scale data, (b), in mx + b form.

- gain—Returns the gain to scale data, (m), in mx + b form.

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. 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](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_GetError.html')) function. To clear the error information from NI-RFSA, call the [niRFSA_ClearError](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_ClearError.html')) function.

The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

| :- | :- | :- |

niRFSA_ReadIQSingleRecordComplexF64

ViStatus niRFSA_ReadIQSingleRecordComplexF64( ViSession vi, ViConstString channelList, ViReal64 timeout, NIComplexNumber* data, ViInt64 dataArraySize, niRFSA_wfmInfo* wfmInfo);

Purpose

Initiates an acquisition and fetches a single I/Q data record. Do not use this function if you have configured the device to continuously acquire data samples or to acquire multiple records.

Supported Devices: PXIe-5644/5645/5646, PXI-5661, PXIe-5663/5663E/5665/5667/5668, PXIe-5820/5830/5831/5832/5840/5841

Related Topics

None (Trigger Type)

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the [niRFSA_init](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_init.html')) or [niRFSA_InitWithOptions](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_initWithOptions.html')) function.
channelList ViConstString Identifies which channels to apply settings. Specify an empty string as the value of this parameter.
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 for the data parameter. The array needs to be at least as large as the number of samples configured in the [niRFSA_ConfigureNumberOfSamples](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_ConfigureNumberOfSamples.html')) function.
Output
Name Type Description
data NIComplexNumber* Returns the acquired waveform. Allocate an NIComplexNumber array at least as large as the number of samples configured in the [niRFSA_ConfigureNumberOfSamples](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_ConfigureNumberOfSamples.html')) function.
wfmInfo niRFSA_wfmInfo*

Contains the absolute and relative timestamps for the operation, the time interval (dt), and the actual number of samples read.

The following list provides more information about each of these properties:

- absolute timestamp—Returns the timestamp, in seconds, of the first fetched sample that is comparable between records and acquisitions.

Note Note  The value of the absolute timestamp returned is always 0 for the PXIe-5644/5645/5646, PXIe-5668, and PXIe-5820/5830/5831/5832/5840/5841.
- relative timestamp—Returns a timestamp that corresponds to the difference, in seconds, between the first sample returned and the Reference Trigger location. The timestamp is zero if the Reference Trigger has not occurred.
Note Note  The value of the relative timestamp returned is always 0 for the PXIe-5644/5645/5646.

- dt—Returns the time interval between data points in the acquired signal. The I/Q data sample rate is the reciprocal of this value.

- actual samples read—Returns an integer representing the number of samples in the waveform.

- offset—Returns the offset to scale data, (b), in mx + b form.

- gain—Returns the gain to scale data, (m), in mx + b form.

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. 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](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_GetError.html')) function. To clear the error information from NI-RFSA, call the [niRFSA_ClearError](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_ClearError.html')) function.

The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

| :- | :- | :- |

Multirecord Acquisition

niRFSA_FetchIQMultiRecordComplexI16

ViStatus niRFSA_FetchIQMultiRecordComplexI16(ViSession vi, ViConstString channelList, ViInt64 startingRecord, ViInt64 numberOfRecords, ViInt64 numberOfSamples, ViReal64 timeout, NIComplexI16 data[], niRFSA_wfmInfo* wfmInfo);

Purpose

Fetches binary I/Q data from multiple records in an acquisition. Fetching transfers acquired waveform data from device memory to computer memory. The data was acquired to onboard memory previously by the hardware after the acquisition was initiated.

This function is not necessary if you use the [niRFSA_ReadIQSingleRecordComplexF64](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_ReadIQSingleRecordComplexF64.html')) function because the niRFSA_ReadIQSingleRecordComplexF64 function performs the fetch as part of the function.

Supported Devices: PXIe-5644/5645/5646, PXI-5661, PXIe-5663/5663E/5665/5667/5668, PXIe-5820/5830/5831/5832/5840/5841

Related Topics

None (Trigger Type)

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the [niRFSA_init](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_init.html')) or [niRFSA_InitWithOptions](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_initWithOptions.html')) function.
channelList ViConstString Identifies which channels to apply settings. Specify an empty string as the value of this parameter.
startingRecord ViInt64 Specifies the first record to retrieve. Record numbers are zero-based. The default value is 0.
numberOfRecords ViInt64 Specifies the number of records to fetch.
numberofSamples ViInt64 Specifies the number of samples per record.
timeout ViReal64 PXI-5661, PXIe-5663/5665/5667—Specifies the time, in seconds, allotted for the function to complete before returning a timeout error.

PXIe-5644/5645/5646, PXIe-5668, PXIe-5820/5830/5831/5832/5840/5841—Specifies the time, in seconds, allotted to receive the reference trigger.
Note Note  For all supported devices, a value of –1 specifies the function waits until all data is available. A value of 0 specifies the function immediately returns available data.

| :- | :- | :- | |Output||| |Name|Type|Description| |data|NIComplexI16[]|Returns the acquired waveform for each record fetched. The waveforms are written sequentially in the array. Allocate an array at least as large as numberOfSamples times numberOfRecords for this parameter.| |wfmInfo|niRFSA_wfmInfo*|

Contains the absolute and relative timestamps for the operation, the time interval (dt), and the actual number of samples read. Each element of this array corresponds to a record.

The following list provides more information about each of these properties:

- absolute timestamp—Returns the timestamp, in seconds, of the first fetched sample that is comparable between records and acquisitions.

|
Note Note  The value of the absolute timestamp returned is always 0 for the PXIe-5644/5645/5646, PXIe-5668, and PXIe-5820/5830/5831/5832/5840/5841.
- relative timestamp—Returns a timestamp that corresponds to the difference, in seconds, between the first sample returned and the Reference Trigger location. The timestamp is zero if the Reference Trigger has not occurred.
Note Note  The value of the relative timestamp returned is always 0 for the PXIe-5644/5645/5646.

- dt—Returns the time interval between data points in the acquired signal. The I/Q data sample rate is the reciprocal of this value.

- actual samples read—Returns an integer representing the number of samples in the waveform.

Note Note  The actual number of samples for each record can vary if the NIRFSA_ATTR_NUMBER_OF_SAMPLES attribute changes per step during RF list mode.

- offset—Returns the offset to scale data, (b), in mx + b form.

- gain—Returns the gain to scale data, (m), in mx + b form.

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. 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](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_GetError.html')) function. To clear the error information from NI-RFSA, call the [niRFSA_ClearError](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_ClearError.html')) function.

The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

| :- | :- | :- |

niRFSA_FetchIQMultiRecordComplexF64

ViStatus niRFSA_FetchIQMultiRecordComplexF64(ViSession vi, ViConstString channelList, ViInt64 startingRecord, ViInt64 numberOfRecords, ViInt64 numberOfSamples, ViReal64 timeout, NIComplexNumber* data, niRFSA_wfmInfo* wfmInfo);

Purpose

Fetches I/Q data from multiple records in an acquisition. A fetch transfers acquired waveform data from device memory to computer memory. The data was acquired to onboard memory previously by the hardware after the acquisition was initiated.

This function is not necessary if you use the [niRFSA_ReadIQSingleRecordComplexF64](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_ReadIQSingleRecordComplexF64.html')) function because the niRFSA_ReadIQSingleRecordComplexF64 function performs the fetch as part of the function.

Supported Devices: PXIe-5644/5645/5646, PXI-5661, PXIe-5663/5663E/5665/5667/5668, PXIe-5820/5830/5831/5832/5840/5841

Related Topics

None (Trigger Type)

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the [niRFSA_init](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_init.html')) or [niRFSA_InitWithOptions](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_initWithOptions.html')) function.
channelList ViConstString Identifies which channels to apply settings. Specify an empty string as the value of this parameter.
startingRecord ViInt64 Specifies the first record to retrieve. Record numbers are zero-based. The default value is 0.
numberOfRecords ViInt64 Specifies the number of records to fetch.
numberOfSamples ViInt64 Specifies the number of samples per record.
timeout ViReal64 PXI-5661, PXIe-5663/5665/5667—Specifies the time, in seconds, allotted for the function to complete before returning a timeout error.

PXIe-5644/5645/5646, PXIe-5668, PXIe-5820/5830/5831/5832/5840/5841—Specifies the time, in seconds, allotted to receive the reference trigger.
Note Note  For all supported devices, a value of –1 specifies the function waits until all data is available. A value of 0 specifies the function immediately returns available data.

| :- | :- | :- | |Output||| |Name|Type|Description| |data|NIComplexNumber*|Returns the acquired waveform for each record fetched. The waveforms are written sequentially in the array. Allocate an array at least as large as numberOfSamples times numberOfRecords for this parameter.| |wfmInfo|niRFSA_wfmInfo*|

Contains the absolute and relative timestamps for the operation, the time interval (dt), and the actual number of samples read. Each element of this array corresponds to a record.

The following list provides more information about each of these properties:

- absolute timestamp—Returns the timestamp, in seconds, of the first fetched sample that is comparable between records and acquisitions.

|
Note Note  The value of the absolute timestamp returned is always 0 for the PXIe-5644/5645/5646, PXIe-5668, and PXIe-5820/5840/5841.
- relative timestamp—Returns a timestamp that corresponds to the difference, in seconds, between the first sample returned and the Reference Trigger location. The timestamp is zero if the Reference Trigger has not occurred.
Note Note  The value of the relative timestamp returned is always 0 for the PXIe-5644/5645/5646.

- dt—Returns the time interval between data points in the acquired signal. The I/Q data sample rate is the reciprocal of this value.

- actual samples read—Returns an integer representing the number of samples in the waveform.

Note Note  The actual number of samples for each record can vary if the NIRFSA_ATTR_NUMBER_OF_SAMPLES attribute changes per step during RF list mode.

- offset—Returns the offset to scale data, (b), in mx + b form.

- gain—Returns the gain to scale data, (m), in mx + b form.

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. 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](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_GetError.html')) function. To clear the error information from NI-RFSA, call the [niRFSA_ClearError](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_ClearError.html')) function.

The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

| :- | :- | :- |

niRFSA_FetchIQMultiRecordComplexF32

ViStatus niRFSA_FetchIQMultiRecordComplexF32(ViSession vi, ViConstString channelList, ViInt64 startingRecord, ViInt64 numberOfRecords, ViInt64 numberOfSamples, ViReal64 timeout, NIComplexNumberF32* data, niRFSA_wfmInfo* wfmInfo);

Purpose

Fetches I/Q data from multiple records in an acquisition. A fetch transfers acquired waveform data from device memory to computer memory. The data was acquired to onboard memory previously by the hardware after the acquisition was initiated.

This function is not necessary if you use the [niRFSA_ReadIQSingleRecordComplexF64](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_ReadIQSingleRecordComplexF64.html')) function because the niRFSA_ReadIQSingleRecordComplexF64 function performs the fetch as part of the function.

Supported Devices: PXIe-5644/5645/5646, PXI-5661, PXIe-5663/5663E/5665/5667/5668, PXIe-5820/5830/5831/5832/5840/5841

Related Topics

None (Trigger Type)

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the [niRFSA_init](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_init.html')) or [niRFSA_InitWithOptions](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_initWithOptions.html')) function.
channelList ViConstString Identifies which channels to apply settings. Specify an empty string as the value of this parameter.
startingRecord ViInt64 Specifies the first record to retrieve. Record numbers are zero-based. The default value is 0.
numberOfRecords ViInt64 Specifies the number of records to fetch.
numberOfSamples ViInt64 Specifies the number of samples per record.
timeout ViReal64 PXI-5661, PXIe-5663/5665/5667—Specifies the time, in seconds, allotted for the function to complete before returning a timeout error.

PXIe-5644/5645/5646, PXIe-5668, PXIe-5820/5830/5831/5832/5840/5841—Specifies the time, in seconds, allotted to receive the reference trigger.
Note Note  For all supported devices, a value of –1 specifies the function waits until all data is available. A value of 0 specifies the function immediately returns available data.

| :- | :- | :- | |Output||| |Name|Type|Description| |data|NIComplexNumberF32*|Returns the acquired waveform for each record fetched. The waveforms are written sequentially in the array. Allocate an array at least as large as numberOfSamples times numberOfRecords for this parameter.| |wfmInfo|niRFSA_wfmInfo*|

Contains the absolute and relative timestamps for the operation, the time interval (dt), and the actual number of samples read. Each element of this array corresponds to a record.

The following list provides more information about each of these properties:

- absolute timestamp—Returns the timestamp, in seconds, of the first fetched sample that is comparable between records and acquisitions.

|
Note Note  The value of the absolute timestamp returned is always 0 for the PXIe-5644/5645/5646, PXIe-5668, and PXIe-5820/5840/5841.
- relative timestamp—Returns a timestamp that corresponds to the difference, in seconds, between the first sample returned and the Reference Trigger location. The timestamp is zero if the Reference Trigger has not occurred.
Note Note  The value of the relative timestamp returned is always 0 for the PXIe-5644/5645/5646.

- dt—Returns the time interval between data points in the acquired signal. The I/Q data sample rate is the reciprocal of this value.

- actual samples read—Returns an integer representing the number of samples in the waveform.

Note Note  The actual number of samples for each record can vary if the NIRFSA_ATTR_NUMBER_OF_SAMPLES attribute changes per step during RF list mode.

- offset—Returns the offset to scale data, (b), in mx + b form.

- gain—Returns the gain to scale data, (m), in mx + b form.

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. 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](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_GetError.html')) function. To clear the error information from NI-RFSA, call the [niRFSA_ClearError](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_ClearError.html')) function.

The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

| :- | :- | :- |

niRFSA_Abort

ViStatus niRFSA_Abort(ViSession vi);

Purpose

Stops an acquisition previously started with the [niRFSA_Initiate](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm','cviniRFSA_Initiate.html')) function or the [niRFSA_ReadPowerSpectrumF64](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm','cviniRFSA_ReadPowerSpectrumF64.html')) function. You can also use the niRFSA_Abort function to stop a self-calibration. Calling this function is optional, unless you want to stop an acquisition before it is complete or you are continuously acquiring data.

You can stop the following kinds of acquisitions:

  • Triggered spectrum acquisitions that have not yet been triggered
  • Multispan acquisitions in progress
  • Average spectrum acquisitions in progress
  • Single-record spectrum acquisitions in progress
  • Streaming in progress

Supported Devices: PXIe-5644/5645/5646, PXI-5661, PXIe-5663/5663E/5665/5667/5668, PXIe-5698, PXIe-5820/5830/5831/5832/5840/5841

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the [niRFSA_init](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_init.html')) or [niRFSA_InitWithOptions](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_initWithOptions.html')) function.

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. 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](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_GetError.html')) function. To clear the error information from NI-RFSA, call the [niRFSA_ClearError](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_ClearError.html')) function.

The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

| :- | :- | :- |

Spectrum Acquisition

niRFSA_ReadPowerSpectrumF32

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

Purpose

Initiates a spectrum acquisition and returns power spectrum data.

Note Under certain configurations, negative infinity is returned from this VI. If the Reference Level is very high and if the Signal Bandwidth is comparatively less, the ADC returns zero, which equates to negative infinity in dBm. This is expected behavior.
Supported Devices: PXIe-5644/5645/5646, PXI-5661, PXIe-5663/5663E/5665/5667/5668, PXIe-5830/5831/5832/5840/5841

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the [niRFSA_init](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_init.html')) or [niRFSA_InitWithOptions](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_initWithOptions.html')) function.
channelList ViConstString Identifies which channels to apply settings. Specify an empty string as the value of this parameter.
timeout ViReal64 Specifies the time, in seconds, 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 ViInt32 Specifies the size of the array that is returned by the powerSpectrumData parameter. Use the [niRFSA_GetNumberOfSpectralLines](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_GetNumberOfSpectralLines.html')) function to obtain the array size 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 ViReal32[] Returns power spectrum data. Allocate an array as large as dataArraySize.
spectrumInfo niRFSA_spectrumInfo* Returns additional information about the powerSpectrumData array. This information includes the frequency, in hertz (Hz), corresponding to the first element in the array, the frequency increment, in Hz, 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. 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](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_GetError.html')) function. To clear the error information from NI-RFSA, call the [niRFSA_ClearError](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_ClearError.html')) function.

The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

| :- | :- | :- |

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.

Note Under certain configurations, negative infinity is returned from this VI. If the Reference Level is very high and if the Signal Bandwidth is comparatively less, the ADC returns zero, which equates to negative infinity in dBm. This is expected behavior.
Supported Devices: PXIe-5644/5645/5646, PXI-5661, PXIe-5663/5663E/5665/5667/5668, PXIe-5830/5831/5832/5840/5841

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the [niRFSA_init](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_init.html')) or [niRFSA_InitWithOptions](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_initWithOptions.html')) function.
channelList ViConstString Identifies which channels to apply settings. Specify an empty string as the value of this parameter.
timeout ViReal64 Specifies the time, in seconds, 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 ViInt32 Specifies the size of the array that is returned by the powerSpectrumData parameter. Use the [niRFSA_GetNumberOfSpectralLines](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_GetNumberOfSpectralLines.html')) function to obtain the array size 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. Allocate an array as large as dataArraySize.
spectrumInfo niRFSA_spectrumInfo* Returns additional information about the powerSpectrumData array. This information includes the frequency, in hertz (Hz), corresponding to the first element in the array, the frequency increment, in Hz, 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. 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](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_GetError.html')) function. To clear the error information from NI-RFSA, call the [niRFSA_ClearError](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_ClearError.html')) function.

The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

| :- | :- | :- |

niRFSA_GetNumberOfSpectralLines

ViStatus niRFSA_GetNumberOfSpectralLines(ViSession vi, ViConstString channelList, ViInt32* numberOfSpectralLines);

Purpose

Returns the number of spectral lines that NI-RFSA computes with the current power spectrum configuration.

Supported Devices: PXI-5600, PXIe-5601/5603/5605/5606 (external digitizer mode), PXIe-5644/5645/5646, PXI-5661, PXIe-5663/5663E/5665/5667/5668, PXIe-5820/5840/5841

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi is obtained from the [niRFSA_init](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_init.html')) or [niRFSA_InitWithOptions](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_initWithOptions.html')) function.
channelList ViConstString Identifies which channels to apply settings. Specify an empty string as the value of this parameter.
Output
Name Type Description
numberOfSpectralLines ViInt32* Returns the value of the [NIRFSA_ATTR_NUMBER_OF_SPECTRAL_LINES](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'NIRFSA_ATTR_NUM_SPECTRAL_LINES.html')) attribute.

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. 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](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_GetError.html')) function. To clear the error information from NI-RFSA, call the [niRFSA_ClearError](javascript:LaunchMergedHelp('nirfsa.chm', 'rfsacref.chm', 'cviniRFSA_ClearError.html')) function.

The general meaning of the status code is as follows:
Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

| :- | :- | :- |

Table of Contents

Internal Development

Creating and Setting Up a gRPC Server

Server Security Support

Creating a gRPC Client

gRPC Client Examples

Session Utilities API Reference

Driver Documentation

gRPC API Differences From C API

Sharing Driver Sessions Between Clients

C API Docs
NI-DAQmx
NI-DCPOWER
NI-DIGITAL PATTERN DRIVER
NI-DMM
NI-FGEN
NI-FPGA
NI-RFmx Bluetooth
NI-RFmx NR
NI-RFmx WCDMA
NI-RFmx GSM
NI-RFmx CDMA2k
NI-RFmx Instr
NI-RFmx LTE
NI-RFmx SpecAn
NI-RFmx TD-SCDMA
NI-RFmx WLAN
NI-RFSA
NI-RFSG
NI-SCOPE
NI-SWITCH
NI-TCLK
NI-XNET
Clone this wiki locally