niRFSG_WriteArbWaveform

NI-RFSG C Function

niRFSG_WriteArbWaveform

C Function Prototype

ViStatus niRFSG_WriteArbWaveform (ViSession vi, ViConstString waveformName, ViInt32 numberOfSamples, ViReal64[] iData, ViReal64[] qData, ViBoolean moreDataPending);

Purpose

Writes an arbitrary waveform to the NI-RFSG device starting at the position of the last data written in onboard memory. This function takes as data input the I and Q vectors of a complex baseband signal. If the waveform is already allocated, the moreDataPending parameter is ignored. Refer to the niRFSG_AllocateArbWaveform function for more information about allocating waveforms. The NI-RFSG device must be in the Configuration state before you call this function.

Supported Devices: NI 5670/5671/5672

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. The ViSession handle is obtained from the niRFSG_init function or the niRFSG_InitWithOptions function and identifies a particular instrument session.

Default Value: None

name ViConstString Specifies the name used to identify the waveform. This string is case-insensitive and alphanumeric, and it does not use reserved words.
numberOfSamples ViInt32 Specifies the number of samples in both the iData and qData arrays. The iData and qData arrays must have the same length. If the NIRFSG_ATTR_ARB_WAVEFORM_QUANTUM attribute value is q, then the number of samples should be a multiple of q. The specified number of samples cannot be 0.
iData ViReal64[] Specifies the in-phase (I) component of the complex baseband signal.
qData ViReal64[] Specifies the quadrature (Q) component of the complex baseband signal.
moreDataPending ViBoolean Specifies whether or not the data block contains the end of the waveform. Set this parameter to VI_TRUE to allow data to be appended later to the waveform. Splitting the waveform into multiple data blocks can reduce the memory requirements of the write operation. Append data to a previously written waveform by using the same waveform in the name parameter. Set moreDataPending to VI_FALSE to indicate that this data block contains the end of the waveform. If the waveform is already allocated, this parameter is ignored.

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 instrument driver function to determine if an error occurred.

To obtain a text description of the status code, call the niRFSG_error_message function. To obtain additional information about the error condition, call the niRFSG_GetError function. To clear the error information from the driver, call the niRFSG_ClearError function.

The general meaning of the status code is as follows:

ValueMeaning
0Success
Positive ValuesWarnings
Negative ValuesErrors