ni-rfsg-c-api-ref-doc

niRFSG_ConfigurePowerLevelType

  • Updated2024-05-08
  • 2 minute(s) read

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

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:

ValueMeaning
0Success
Positive ValuesWarnings
Negative ValuesErrors

Log in to get a better experience