niRFSG_WriteArbWaveform
- Updated2025-10-14
- 2 minute(s) read
Writes an arbitrary waveform to the NI-RFSG device. This function configures the I and Q vectors of a complex baseband signal.
Syntax
ViStatus __stdcall niRFSG_WriteArbWaveform(ViSession vi, ViConstString waveformName, ViInt32 numberOfSamples, const ViReal64 iData[], const ViReal64 qData[], ViBoolean moreDataPending)
Remarks
If the waveform to write is already allocated using the niRFSG_AllocateArbWaveform function, the moreDataPending parameter is ignored. The PXI-5670/5671 must be in the Configuration state before you call this function. When streaming is enabled, you can call this function when the PXIe-5672/5673/5673E and PXIe-5820/5830/5831/5832/5840/5841/5842/5860 is in the Generation state.
On the PXIe-5644/5645/5646, PXIe-5672/5673/5673E, and PXIe-5820/5830/5831/5832/5840/5841/5842/5860, the moreDataPending parameter is always ignored. To write data in blocks on these devices, you must allocate the waveform before writing it.
Supported Devices: PXIe-5644/5645/5646, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841/5842/5860
Related Topics
Parameters
| Name | Direction | Type | Description |
|---|---|---|---|
| vi | [in] | 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. |
| waveformName | [in] | ViConstString | Specifies the name used to identify the waveform. This string is case-insensitive and alphanumeric, and it does not use reserved words. |
| numberOfSamples | [in] | 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 | [in] | const ViReal64[] | Specifies the in-phase (I) component of the complex baseband signal. |
| qData | [in] | const ViReal64[] | Specifies the quadrature (Q) component of the complex baseband signal. |
| moreDataPending | [in] | 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. |
Returns
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 error code, call the niRFSG_GetError function. The general meaning of the status code is as follows:
Value | Meaning |
|---|---|
0 | Success |
Positive Values | Warnings |
Negative Values | Errors |