Assigning Properties or Attributes to a Waveform

NI-RFSG can store the I/Q rate, peak power adjustment, and arb carrier frequency property or attribute for a waveform. When switching between waveforms, the associated waveform properties or attributes also change. You can assign waveform properties and attributes in Arb waveform generation mode or Script generation mode. Use the niRFSG Configure Generation Mode VI or niRFSG_ConfigureGenerationMode function to select between the two modes.

Use one of the following methods to determine the coerced values of properties or attributes associated with a waveform:

  • Use the Active Channel property or the channelName parameter of the niRFSG_GetAttributeViReal64 function to specify the waveform or script from which to return the coerced value.
  • If you do not use the Active Channel property or the channelName parameter of the niRFSG_GetAttributeViReal64 function, NI-RFSG returns the coerced value set by the Selected Waveform property or the Selected Script property.
    Note If you configure NI-RFSG in Arb Waveform mode, the driver returns the coerced value from the Selected Waveform property. If you configure NI-RFSG in Script mode, the driver returns the coerced value from the Selected Script property.

Arb Waveform Generation Mode

Use the Active Channel property or the channelName parameter of the niRFSG_GetAttributeViReal64 function to name a waveform and associate the IQ Rate, Peak Power Adjustment, and Arb Carrier Frequency properties or the NIRFSG_ATTR_IQ_RATE, NIRFSG_ATTR_PEAK_POWER_ADJUSTMENT, and NIRFSG_ATTR_ARB_CARRIER_FREQUENCY attributes with the named waveform. The waveform must be allocated or written to before associating properties or attributes with it. When you select the waveform through the niRFSG Select Arb Waveform VI or niRFSG_SelectArbWaveform function, the associated properties or attributes are used when the device is initiated.

When a waveform is cleared, the properties or attributes associated with it are also cleared.

Script Generation Mode

Use the Active Channel property or the channelName parameter of the niRFSG_GetAttributeViReal64 function to specify the waveform name to assign the IQ Rate, Peak Power Adjustment, and Arb Carrier Frequency properties or the NIRFSG_ATTR_IQ_RATE, NIRFSG_ATTR_PEAK_POWER_ADJUSTMENT, and NIRFSG_ATTR_ARB_CARRIER_FREQUENCY attributes to the waveforms called in your script. NI-RFSG then parses the script to determine which waveforms must be generated and which waveform properties or attributes can be inherited. If a property or attribute is inherited by a script, NI-RFSG uses the inherited value when the script is being generated.

Property or attribute inheritance typically requires all values for a particular property or attribute to be the same for all waveforms in the script. However, property or attribute inheritance does not always behave typically. The following list describes typical inheritance cases:

  • If a property or attribute is not set for a waveform, the waveform uses the value of the non-waveform specific property or attribute to compare to the other values found in the script. For example, given a global I/Q rate of 5 MS/s, if a script generates three waveforms (A, B, and C), and waveforms B and C have specified I/Q rates of 10 MS/s while waveform A does not specify the I/Q rate, NI-RFSG compares the two I/Q rates, 10 MS/s and 5 MS/s, and because they are not the same, an error occurs.
  • If the Peak Power Adjustment property or NIRFSG_ATTR_PEAK_POWER_ADJUSTMENT attribute is used to create an offset of different power levels between waveforms in a script, the Peak Power Adjustment Inheritance Behavior property or NIRFSG_ATTR_PPA_SCRIPT_INHERITANCE_BEHAVIOR attribute determines the inheritance behavior for the peak power adjustment property or attribute.
  • If the Peak Power Adjustment or IQ Rate properties or NIRFSG_ATTR_PEAK_POWER_ADJUSTMENT or NIRFSG_ATTR_IQ_RATE attributes are set to INF or NIRFSG_VAL_INF for a waveform, the value specified by the other waveforms in the script is used.

Related Topics

niRFSG Configure Generation Mode VI

niRFSG_ConfigureGenerationMode Function

Active Channel Property

niRFSG_GetAttributeViReal64 Function

Selected Waveform Property

Selected Script Property

IQ Rate Property

NIRFSG_ATTR_IQ_RATE Attribute

Peak Power Adjustment Property

NIRFSG_ATTR_PEAK_POWER_ADJUSTMENT Attribute

Arb Carrier Frequency Property

NIRFSG_ATTR_ARB_CARRIER_FREQUENCY Attribute