Skip to content

Configuration of A Waveform

IPetersNI edited this page Dec 9, 2022 · 3 revisions

Configure Waveform

niRFSG_ConfigureGenerationMode

C Function Prototype

ViStatus niRFSG_ConfigureGenerationMode (ViSession vi, ViInt32 generationMode);

Purpose

Configures the NI-RFSG device to generate a continuous sine tone (CW), apply I/Q (vector) modulation to the RF output signal, or generate arbitrary waveforms according to scripts. The NI-RFSG device must be in the Configuration state before you call this function.

Supported Devices: PXIe-5644/5645/5646, PXI/PXIe-5650/5651/5652, PXIe-5653/5654/5654 with PXIe-5696, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841

Related Topics

Assigning Properties or Attributes to a Waveform

Scripting Instructions—Refer to this topic for more information about VST restrictions on scripts.

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.
generationMode ViInt32

Specifies the mode used by NI-RFSG for generating an RF output signal.

Defined Values:

NIRFSG_VAL_CW Configures the RF signal generator to generate a CW signal.
NIRFSG_VAL_ARB_WAVEFORM Configures the RF signal generator to generate arbitrary waveforms.
NIRFSG_VAL_SCRIPT Configures the RF signal generator to generate arbitrary waveforms as directed by scripts.

Default Value: NIRFSG_VAL_CW


 Note  For the PXI/PXIe-5650/5651/5652, PXIe-5653/5654/5654 with PXIe-5696, only NIRFSG_VAL_CW is supported.

| :- | :- | :- |

 Note  If you are using an RF vector signal transceiver (VST) device, some script instructions may not be supported.

| :- | :- | :- |

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 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

| :- | :- | :- |

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. This function configures the I and Q vectors of a complex baseband signal. 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 is in the Generation state.

Note Note  On the PXIe-5644/5645/5646, PXIe-5672/5673/5673E, and PXIe-5820/5830/5831/5832/5840/5841, 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

Related Topics

Streaming

Assigning Properties or Attributes to a Waveform

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

| :- | :- | :- |

niRFSG_WriteArbWaveformF32

C Function Prototype

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

Purpose

Writes an arbitrary waveform to the NI-RFSG device. This function configures the I and Q vectors of a complex single baseband signal. 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 or PXIe-5820/5830/5831/5832/5840/5841 is in the Generation state.

Note Note  On the PXIe-5644/5645/5646, PXIe-5672/5673/5673E, and PXIe-5820/5830/5831/5832/5840/5841, 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

Related Topics

Streaming

Assigning Properties or Attributes to a Waveform

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.
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 ViReal32[] Specifies the in-phase (I) component of the complex baseband signal.
qData ViReal32[] 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 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

| :- | :- | :- |

niRFSG_WriteArbWaveformComplexF64

C Function Prototype

ViStatus niRFSG_WriteArbWaveformComplexF64 (ViSession vi, ViConstString waveformName, ViInt32 numberOfSamples, NIComplexNumber wfmData[], 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 accepts the complex baseband data in the form of complex doubles. 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 or PXIe-5820/5830/5831/5832/5840/5841 is in the Generation state.

Note Note  On the PXIe-5644/5645/5646, PXIe-5672/5673/5673E, and PXIe-5820/5830/5831/5832/5840/5841, 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

Related Topics

Streaming

Assigning Properties or Attributes to a Waveform

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.
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 of the data arrays.
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.
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 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

| :- | :- | :- |

niRFSG_WriteArbWaveformComplexF32

C Function Prototype

ViStatus niRFSG_WriteArbWaveformComplexF32 (ViSession vi, ViConstString waveformName, ViInt32 numberOfSamples, NIComplexNumberF32 wfmData[], 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 accepts the complex baseband data in the form of complex singles. 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 or PXIe-5820/5830/5831/5832/5840/5841 is in the Generation state.

Note Note  On the PXIe-5644/5645/5646, PXIe-5672/5673/5673E, and PXIe-5820/5830/5831/5832/5840/5841, 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

Related Topics

Streaming

Assigning Properties or Attributes to a Waveform

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.
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 of the data arrays.
data NIComplexNumberF32[] 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.
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 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

| :- | :- | :- |

niRFSG_WriteArbWaveformComplexI16

C Function Prototype

ViStatus niRFSG_WriteArbWaveformComplexI16 (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 accepts the interleaved I/Q data of a complex baseband signal. The PXI-5670/5671 must be in the Configuration state before you call this function. When streaming is enabled, this function can be called when the PXIe-5672/5673/5673E or PXIe-5820/5830/5831/5832/5840/5841 is in the Generation state.

Note Note  This function only supports NIRFSG_VAL_PEAK_POWER mode as specified in the NIRFSG_ATTR_POWER_LEVEL_TYPE attribute. If you download a waveform when using this function, you cannot set the NIRFSG_ATTR_POWER_LEVEL_TYPE to NIRFSG_VAL_AVERAGE_POWER without causing error in the output.
Supported Devices: PXIe-5644/5645/5646, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841

Related Topics

Streaming

Assigning Properties or Attributes to a Waveform

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.
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 NIComplexI16[] 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 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

| :- | :- | :- |

niRFSG_CheckIfWaveformExists

C Function Prototype

ViStatus niRFSG_CheckIfWaveformExists (ViSession vi, ViConstString waveformName, ViBoolean* waveformExists);

Purpose

Returns whether the waveform that you specify as waveformName exists.

Supported Devices: PXIe-5673/5673E

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.
waveformName ViConstString Specifies the name used to store the waveform. This string is case-insensitive.
Output
Name Type Description
waveformExists ViBoolean* Returns VI_TRUE if the waveform exists.

Defined Values:
VI_TRUE The waveform exists.
VI_FALSE The waveform does not exist.

| :- | :- | :- |

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 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

| :- | :- | :- |

niRFSG_ReadAndDownloadWaveformFromFileTDMS

C Function Prototype

ViStatus niRFSG_ReadAndDownloadWaveformFromFileTDMSComplexI16 (ViSession vi, ViConstString waveformName, ViConstString filePath, ViUInt32 waveformIndex);

Purpose

Reads the waveforms from a TDMS file and downloads one waveform into each of the NI RF vector signal generators.

This function reads the following information from the TDMS file and writes it into the NI-RFSG session:

  • Sample Rate
  • PAPR
  • Runtime Scaling
  • RF Blanking Marker Locations
  • RF Blanking Enabled
  • Burst Start Locations
  • Burst Stop Locations
  • RF Blanking Marker Source
  • Signal Bandwidth
  • Waveform Size

If RF blanking marker locations are present in the file but burst locations are not present, burst locations are calculated from RF blanking marker locations and stored in the NI-RFSG session.

Supported Devices: PXIe-5820/5830/5831/5832/5840/5841

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.
waveformName ViConstString

Specifies the name used to store the waveform. This string is case-insensitive.

Example:

"waveform::waveform0"

filePath ViInt32 Specifies the absolute path to the TDMS file from which the NI-RFSG reads the waveforms.
waveformIndex NIComplexI16[] Specifies the index of the waveform to be read from the TDMS file.

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 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

| :- | :- | :- |

niRFSG_SelectArbWaveform

C Function Prototype

ViStatus niRFSG_SelectArbWaveform (ViSession vi, ViConstString name);

Purpose

Specifies the waveform that is generated upon a call to the niRFSG_Initiate function when the generationMode parameter of the niRFSG_ConfigureGenerationMode function is set to NIRFSG_VAL_ARB_WAVEFORM. You must specify a waveform using the name parameter if you have written multiple waveforms. The NI-RFSG device must be in the Configuration state before you call this function.

Supported Devices: PXIe-5644/5645/5646, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841

Related Topics

Assigning Properties or Attributes to a Waveform

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.
name ViConstString Specifies the name of the stored waveform to generate. This is a case-insensitive alphanumeric string that does not use reserved words. NI-RFSG sets the NIRFSG_ATTR_ARB_SELECTED_WAVEFORM attribute to this value.

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 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

| :- | :- | :- |

niRFSG_ClearArbWaveform

C Function Prototype

ViStatus niRFSG_ClearArbWaveform (ViSession vi, ViConstString name);

Purpose

Deletes a specified waveform from the pool of currently defined waveforms. The NI-RFSG device must be in the Configuration state before you call this function.

Supported Devices: PXIe-5644/5645/5646, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841

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.
name ViConstString Name of the stored waveform to delete.

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 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

| :- | :- | :- |

niRFSG_ClearAllArbWaveforms

C Function Prototype

ViStatus niRFSG_ClearAllArbWaveforms (ViSession vi);

Purpose

Deletes all currently defined waveforms and scripts. The NI-RFSG device must be in the Configuration state before you call this function.

Supported Devices: PXIe-5644/5645/5646, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841

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.

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 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

| :- | :- | :- |

niRFSG_ConfigureDigitalModulationUserDefinedWaveform

C Function Prototype

ViStatus niRFSG_ConfigureDigitalModulationUserDefinedWaveform (ViSession vi, ViInt32 numberOfSamples, ViInt8 userDefinedWaveform[]);

Purpose

Specifies the message signal used for digital modulation when the NIRFSG_ATTR_DIGITAL_MODULATION_WAVEFORM_TYPE attribute is set to NIRFSG_VAL_USER_DEFINED.

Supported Devices: PXI/PXIe-5650/5651/5652

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.
numberOfSamples ViInt32 Specifies the number of samples in the message signal.
userDefinedWaveform ViInt8[] Specifies the user-defined message signal used for digital modulation.

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 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

| :- | :- | :- |

niRFSG_AllocateArbWaveform

C Function Prototype

ViStatus niRFSG_AllocateArbWaveform (ViSession vi, ViConstString name, ViInt32 size_in_samples);

Purpose

Allocates onboard memory space for the arbitrary waveform. Use this function to specify the total size of a waveform before writing the data. Use this function only if you are calling the niRFSG_WriteArbWaveform function multiple times to write a large waveform in smaller blocks.

The NI-RFSG device must be in the Configuration state before you call this function.

Supported Devices: PXIe-5644/5645/5646, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841

Related Topics

Streaming Waveform Data

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.
name ViConstString Specifies the name used to identify the waveform. This string is case-insensitive and alphanumeric, and it does not use reserved words.
size_in_samples ViInt32 Specifies the number of samples to reserve in the onboard memory for the specified waveform. Each I/Q pair is considered one sample.

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 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

| :- | :- | :- |

niRFSG_ConfigureSignalBandwidth

C Function Prototype

ViStatus niRFSG_ConfigureSignalBandwidth (ViSession vi, ViReal64 signalBandwidth);

Purpose

Configures the signal bandwidth of the arbitrary waveform. The NI-RFSG device must be in the Configuration state before you call this function.

NI-RFSG defines signal bandwidth as twice the maximum baseband signal deviation from 0 Hz. Usually, the baseband signal center frequency is 0 Hz. In such cases, the signal bandwidth is simply the baseband signal minimum frequency subtracted from its maximum frequency, or fmax minus fmin. NI-RFSG uses this value to optimally configure the center frequency of the upconverter to help minimize phase noise. The generated signal is not filtered to achieve the set bandwidth. However, specifying a bandwidth smaller than the actual bandwidth of the signal could potentially result in spectral distortion.

Note Note  Based on your signal bandwidth, NI-RFSG decides whether to configure the upconverter center frequency on the PXI-5670/5671 or PXIe-5672 in increments of 1 MHz or 5 MHz. Failure to configure signal bandwidth may result in the signal being placed outside the upconverter passband.
Supported Devices: PXIe-5644/5645/5646, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841

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.
signalBandwidth ViReal64 Specifies the signal bandwidth used by NI-RFSG to generate an RF output signal. NI-RFSG sets the NIRFSG_ATTR_SIGNAL_BANDWIDTH attribute to this value.

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 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

| :- | :- | :- |

niRFSG_SetArbWaveformNextWritePosition

C Function Prototype

ViStatus niRFSG_SetArbWaveformNextWritePosition (ViSession vi, ViConstString name, ViInt32 Relative_To, ViInt32 Offset);

Purpose

Configures the start position to use for writing a waveform before calling the niRFSG_WriteArbWaveform function. This function allows you to write to arbitrary locations within the waveform. These settings apply only to the next write to the waveform specified by the name input of the niRFSG_AllocateArbWaveform function or the niRFSG_WriteArbWaveform function. Subsequent writes to that waveform begin where the last write ended, unless this function is called again.

Note Note  If you use this function to write the waveform that is currently generating, an undefined output may result.
Supported Devices: PXIe-5644/5645/5646, PXIe-5820/5830/5831/5832/5840/5841

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.
name ViConstString Specifies the name of the waveform. This string is case-insensitive and alphanumeric, and it cannot use reserved words.
relativeTo ViInt32 Specifies the reference position in the waveform. The position and offset together determine where to start loading data into the waveform.

Defined Values:
NIRFSG_VAL_START_OF_WAVEFORM The reference position is relative to the start of the waveform.
NIRFSG_VAL_CURRENT_POSITION The reference position is relative to the current position.

| :- | :- | :- | |offset|ViInt32|Specifies the offset from the relative to parameter at which to start loading the data into the waveform.|

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 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

| :- | :- | :- |

niRFSG_ConfigurePowerLevelType

C Function Prototype

ViStatus niRFSG_ConfigurePowerLevelType (ViSession vi, ViInt32 power_level_type);

Purpose

Specifies the way the driver interprets the NIRFSG_ATTR_POWER_LEVEL attribute. In average power mode, NI-RFSG automatically scales waveform data to use the maximum dynamic range. In peak power mode, waveforms are scaled according to the NIRFSG_ATTR_ARB_WAVEFORM_SOFTWARE_SCALING_FACTOR attribute.

Supported Devices: PXIe-5644/5645/5646, PXI-5670/5671, PXIe-5672/5673/5673E, PXIe-5820/5830/5831/5832/5840/5841

Related Topics

Spurious Performance

Optimizing for Low Power Generation

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.
power_level_type ViInt32 Specifies the way the driver interprets the value of the NIRFSG_ATTR_POWER_LEVEL attribute. NI-RFSG sets the NIRFSG_ATTR_POWER_LEVEL_TYPE attribute to this value.
Average Power (default) Indicates the desired power averaged in time. The driver maximizes the dynamic range by scaling the I/Q waveform so that its peak magnitude is equal to one. If you write more than one waveform, NI-RFSG scales each waveform without preserving the power level ratio between the waveforms. This value is not valid for the PXIe-5820.
Peak Power Indicates the maximum power level of the RF signal averaged over one period of the RF carrier frequency (the peak envelope power). This setting requires the magnitude of the I/Q waveform to be less than or equal to one. When using peak power, the power level of the RF signal matches the specified power level at moments when the magnitude of the I/Q waveform equals one. If you write more than one waveform, the relative scaling between waveforms is preserved. In peak power mode, waveforms are scaled according to the NIRFSG_ATTR_ARB_WAVEFORM_SOFTWARE_SCALING_FACTOR 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 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

| :- | :- | :- |

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