niRFSG_WriteArbWaveformComplexI16

NI-RFSG C Function

niRFSG_WriteArbWaveformComplexI16

C Function Prototype

ViStatus niRFSG_WriteArbWaveform (ViSession vi, ViConstString waveformName, ViInt32 numberOfSamples, NIComplexI16 wfmData[]);

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 data array 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 calling this function.

Note Note  This function only supports NIRFSG_VAL_PEAK_POWER mode as specified in the NIRFSG_ATTR_POWER_LEVEL_TYPE attribute. If a waveform is downloaded using this function, NIRFSG_ATTR_POWER_LEVEL_TYPE cannot be changed to NIRFSG_VAL_AVERAGE_POWER mode without causing error in the output.

Supported Devices: NI 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 the data array.
data NIComplexNumber[] Specifies the array of data to load into the waveform. The array must have at least as many elements as the value in the size_in_samples parameter in the niRFSG_AllocateArbWaveform 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 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