Skip to content

NI FGEN Output Attributes

Palash Khare edited this page Jun 3, 2021 · 2 revisions

Output Attributes

NIFGEN_ATTRIBUTE_OUTPUT_MODE

IviFgenBase Attribute

Numeric Value Data Type Access Applies to Coercion High-Level Functions
1250001 ViInt32 R/W N/A None niFgen_ConfigureOutputMode

Description

Specifies which output mode the signal generator uses. The value that you specify determines which functions and attributes you can use to configure the waveform that the signal generator produces.

Defined Values

NIFGEN_VAL_OUTPUT_FUNC Standard Function mode— Generates standard function waveforms such as sine, square, triangle, and so on.
NIFGEN_VAL_OUTPUT_FREQ_LIST Frequency List mode—Generates a standard function using a list of frequencies you define.
NIFGEN_VAL_OUTPUT_ARB Arbitrary Waveform mode—Generates waveforms from user-created/provided waveform arrays of numeric data.
NIFGEN_VAL_OUTPUT_SEQ Arbitrary Sequence mode —Generates downloaded waveforms in an order your specify.
NIFGEN_VAL_OUTPUT_SCRIPT Script mode—Allows you to use scripting to link and loop multiple waveforms in complex combinations.

Default Value: NIFGEN_VAL_OUTPUT_FUNC

Standard Function

When you set this attribute to NIFGEN_VAL_OUTPUT_FUNC, you can use the following functions to configure the waveform:

  • niFgen_ConfigureStandardWaveform
  • niFgen_DefineUserStandardWaveform
  • niFgen_ClearUserStandardWaveform
  • niFgen_ConfigureFrequency
  • niFgen_ConfigureAmplitude

And you can set the following attributes:

  • NIFGEN_ATTRIBUTE_FUNC_WAVEFORM
  • NIFGEN_ATTRIBUTE_FUNC_AMPLITUDE
  • NIFGEN_ATTRIBUTE_FUNC_DC_OFFSET
  • NIFGEN_ATTRIBUTE_FUNC_FREQUENCY
  • NIFGEN_ATTRIBUTE_FUNC_START_PHASE
  • NIFGEN_ATTRIBUTE_FUNC_DUTY_CYCLE_HIGH

Frequency List

When you set this attribute to NIFGEN_VAL_OUTPUT_FREQ_LIST, you can use the following functions to configure the waveform:

  • niFgen_CreateFreqList
  • niFgen_ClearFreqList
  • niFgen_QueryFreqListCapabilities
  • niFgen_ConfigureFreqList
  • niFgen_ConfigureAmplitude

And you can set the following attributes:

  • NIFGEN_ATTRIBUTE_FREQ_LIST_HANDLE
  • NIFGEN_ATTRIBUTE_FUNC_AMPLITUDE
  • NIFGEN_ATTRIBUTE_FUNC_DC_OFFSET
  • NIFGEN_ATTRIBUTE_FUNC_START_PHASE

Arbitrary Waveform

When you set this attribute to NIFGEN_VAL_OUTPUT_ARB, you can use the following functions to configure the waveform:

  • niFgen_QueryArbWfmCapabilities
  • niFgen_CreateWaveformF64
  • niFgen_CreateWaveformI16
  • niFgen_CreateWaveformFromFileI16
  • niFgen_CreateWaveformFromFileF64
  • niFgen_CreateWaveformFromFileHWS
  • niFgen_ClearArbWaveform
  • niFgen_ClearArbMemory
  • niFgen_ConfigureSampleRate
  • niFgen_ConfigureGain
  • niFgen_ConfigureArbWaveform
  • niFgen_ConfigureClockMode

And you can set the following attributes:

  • NIFGEN_ATTRIBUTE_ARB_WAVEFORM_HANDLE
  • NIFGEN_ATTRIBUTE_ARB_GAIN
  • NIFGEN_ATTRIBUTE_ARB_OFFSET
  • NIFGEN_ATTRIBUTE_ARB_SAMPLE_RATE
  • NIFGEN_ATTRIBUTE_CLOCK_MODE

Arbitrary Sequence

When you set this parameter to NIFGEN_VAL_OUTPUT_SEQ, you can use the following functions to configure the sequence:

  • niFgen_QueryArbWfmCapabilities
  • niFgen_CreateWaveformF64
  • niFgen_CreateWaveformI16
  • niFgen_CreateWaveformFromFileI16
  • niFgen_CreateWaveformFromFileF64
  • niFgen_CreateWaveformFromFileHWS
  • niFgen_ClearArbWaveform
  • niFgen_ClearArbMemory
  • niFgen_QueryArbSeqCapabilities
  • niFgen_CreateArbSequence
  • niFgen_CreateAdvancedArbSequence
  • niFgen_ClearArbSequence
  • niFgen_ConfigureSampleRate
  • niFgen_ConfigureClockMode
  • niFgen_ConfigureArbSequence
  • niFgen_ConfigureGain

And you can set the following attributes:

  • NIFGEN_ATTRIBUTE_ARB_SEQUENCE_HANDLE
  • NIFGEN_ATTRIBUTE_ARB_GAIN
  • NIFGEN_ATTRIBUTE_ARB_OFFSET
  • NIFGEN_ATTRIBUTE_ARB_SAMPLE_RATE
  • NIFGEN_ATTRIBUTE_CLOCK_MODE

Script

When you set this parameter to NIFGEN_VAL_OUTPUT_SCRIPT, you can use the following functions to configure the script:

  • niFgen_AllocateNamedWaveform
  • niFgen_SetNamedWaveformNextWritePosition
  • niFgen_WriteNamedWaveformF64
  • niFgen_WriteNamedWaveformI16
  • niFgen_WriteNamedWaveformComplexF64
  • niFgen_WriteNamedWaveformI16
  • niFgen_DeleteNamedWaveform
  • niFgen_WriteScript
  • niFgen_DeleteScript

And you can set the following attribute:

  • NIFGEN_ATTRIBUTE_SCRIPT_TO_GENERATE

NIFGEN_ATTRIBUTE_OUTPUT_ENABLED

IviFgenBase Attribute

Numeric Value Data Type Access Applies to Coercion High-Level Functions
1250003 ViBoolean R/W Channel None niFgen_ConfigureOutputEnabled

Description

Specifies whether the signal that the signal generator produces appears at the output connector.

Defined Values

VI_TRUE Enables the output at the channel output connector.
VI_FALSE Disables the output at the channel output connector.

NIFGEN_ATTRIBUTE_DIGITAL_GAIN

Specific Attribute

Numeric Value Data
type
Access Applies to Coercion High Level Functions
1150254 ViReal64 R/W N/A None None

Description

Specifies a factor by which the signal generator digitally multiplies generated data before converting it to an analog signal in the DAC. For a digital gain greater than 1.0, the product of digital gain times the generated data must be inside the range ±1.0, assuming floating point data. If the product exceeds these limits, the signal generator clips the output signal, and an error results.

Some signal generators support both digital gain and an analog gain, specified with the NIFGEN_ATTRIBUTE_FUNC_AMPLITUDE attribute or NIFGEN_ATTRIBUTE_ARB_GAIN attribute. Digital gain can be changed during generation without the glitches that may occur when changing analog gains, due to relay switching. However, the DAC output resolution is a function of analog gain, so only analog gain makes full use of the resolution of the DAC.

Default Value: 1.0

NIFGEN_ATTRIBUTE_ANALOG_PATH

Specific Attribute

Numeric Value Data Type Access Applies to Coercion High-Level Functions
1150222 ViInt32 R/W N/A None None

Description

Specifies the analog signal path. The main path allows the user to configure gain, offset, analog filter status, output impedance, and output enable.

The direct path presents a much smaller gain range, and you cannot adjust offset or the filter status. The direct path provides a smaller output range but lower distortion. The main path has two amplifier options, high and low gain. Setting this value to NIFGEN_VAL_MAIN_ANALOG_PATH allows NI-FGEN to choose the amplifier based on the user-specified gain.

Note:  You cannot change this attribute while the device is generating a waveform. If you want to change the device configuration, call the niFgen_AbortGeneration function or wait for the generation to complete.

Defined Values

NIFGEN_VAL_MAIN_ANALOG_PATH Specifies use of the main path. NI-FGEN chooses the amplifier based on the user-specified gain.
NIFGEN_VAL_DIRECT_ANALOG_PATH Specifies use of the direct path.
NIFGEN_VAL_FIXED_LOW_GAIN_ANALOG_PATH Specifies use of the low-gain amplifier in the main path, no matter what value the user specifies for gain. This setting limits the output range.
NIFGEN_VAL_FIXED_HIGH_GAIN_ANALOG_PATH Specifies use of the high–gain amplifier in the main path.

Default Value: NIFGEN_VAL_MAIN_ANALOG_PATH

NIFGEN_ATTRIBUTE_LOAD_IMPEDANCE

Specific Attribute

Numeric Value Data Type Access Applies to Coercion High-Level Functions
1150220 ViReal64 R/W N/A None None

Description

Specifies the load impedance connected to the analog output of the channel.

If you set this channel-based attribute to NIFGEN_VAL_MATCHED_LOAD_IMPEDANCE (–1.0), NI-FGEN assumes that the load impedance matches the value of the NIFGEN_ATTRIBUTE_OUTPUT_IMPEDANCE attribute. NI-FGEN compensates to give the desired peak-to-peak voltage amplitude or arbitrary gain (relative to 1 V).

Note:  You cannot change this attribute while the device is generating a waveform. If you want to change the device configuration, call the niFgen_AbortGeneration function or wait for the generation to complete.

NIFGEN_ATTRIBUTE_OUTPUT_IMPEDANCE

IviFgenBase Attribute

Numeric Value Data Type Access Applies to Coercion High-Level Functions
1250004 ViReal64 R/W Channel None niFgen_ConfigureOutputImpedance

Description

Specifies the output impedance of the signal generator at the output connector. NI signal generators have an output impedance of 50 Ω and an optional 75 Ω on select modules.

If the NIFGEN_ATTRIBUTE_LOAD_IMPEDANCE attribute value matches the output impedance, the voltage at the signal output connector is at the necessary level. The voltage at the signal output connector varies with load output impedance, up to doubling the voltage for a high-impedance load.

Note:  You cannot change this attribute while the device is generating a waveform. If you want to change the device configuration, call the niFgen_AbortGeneration function or wait for the generation to complete.

Defined Values

NIFGEN_VAL_50_OHMS The signal generator uses 50.0 Ω of output impedance.
NIFGEN VAL_75_OHMS The signal generator uses 75.0 Ω of output impedance.

Default Value: 50.0

NIFGEN_ATTRIBUTE_TERMINAL_CONFIGURATION

Specific Attribute

Numeric Value Data Type Access Applies to Coercion High-Level Functions
1150365 ViInt32 R/W Channel None None

Description

Specifies whether to analyze gain and offset values based on single-ended or differential operation.

Note:  You cannot change this attribute while the device is generating a waveform. If you want to change the device configuration, call the niFgen_AbortGeneration function or wait for the generation to complete.

Defined Values

NIFGEN_VAL_SINGLE_ENDED Specifies that the signal generator is in the single-ended operation mode.
NIFGEN_VAL_DIFFERENTIAL Specifies that the signal generator is in the differential operation mode.

NIFGEN_ATTRIBUTE_COMMON_MODE_OFFSET

Specific Attribute

Numeric Value Data Type Access Applies to Coercion High-Level Functions
1150366 ViReal64 R/W Channel None None

Description

Specifies the value the signal generator adds to or subtracts from the arbitrary waveform data. This attribute applies only when you set the NIFGEN_ATTRIBUTE_TERMINAL_CONFIGURATION attribute to NIFGEN_VAL_DIFFERENTIAL. Common-mode offset is applied to the signals generated at each differential output terminal.

NIFGEN_ATTRIBUTE_CHANNEL_DELAY

Specific Attribute

Numeric Value Data Type Access Applies to Coercion High-Level Functions
1150369 ViReal64 R/W Channel None None

Description

Specifies the delay to apply to the analog output of the channel specified by the channel string.

You can use the output delay to configure the timing relationship between channels on a multichannel device. Values for this property can be zero or positive. A value of zero indicates that the channels are aligned. A positive value delays the analog output by the specified number of seconds.

Note:  You cannot change this attribute while the device is generating a waveform. If you want to change the device configuration, call the niFgen_AbortGeneration function or wait for the generation to complete.

Default Value: 0

NIFGEN_ATTRIBUTE_ABSOLUTE_DELAY

Numeric Value Data type Access Coercion High Level Functions
1150225 ViReal64 R/W None None

Description

Specifies the sub-Sample Clock delay, in seconds, to apply to the waveform. Use this attribute to reduce the trigger jitter when synchronizing multiple devices with NI-TClk. This attribute can also help maintain synchronization repeatability by writing the absolute delay value of a previous measurement to the current session.

To set this attribute, the waveform generator must be in the Idle (Configuration) state.

Note:  If this attribute is set, NI-TClk cannot perform any sub-Sample Clock adjustment.

Units: seconds (s)

Valid Values: Plus or minus half of one Sample Clock period

Default Value: 0.0

Supported Devices: PXIe-5413/5423/5433

NIFGEN_ATTRIBUTE_ANALOG_FILTER_ENABLED

Specific Attribute

Numeric Value Data Type Access Applies to Coercion High-Level Functions
1150103 ViBoolean R/W N/A None None

Description

Specifies whether the signal generator applies an analog filter to the output signal. This attribute is valid in Arbitrary Waveform, Arbitrary Sequence, and Script output modes. You also can use this property in Standard Function and Frequency List output modes for user-defined waveforms.

Defined Values

VI_TRUE NI-FGEN applies an analog filter.
VI_FALSE NI-FGEN does not apply an analog filter.

Default Value: VI_FALSE

NIFGEN_ATTRIBUTE_DIGITAL_FILTER_ENABLED

Specific Attribute

Numeric Value Data Type Access Applies to Coercion High-Level Functions
1150102 ViBoolean R/W N/A None None

Description

Controls whether the signal generator applies a digital filter to the output signal. This attribute is valid in Arbitrary Waveform, Arbitrary Sequence, and Script output modes. This attribute can also be used in Standard Function and Frequency List output modes for user–defined waveforms.

Defined Values

VI_TRUE NI-FGEN applies a digital filter.
VI_FALSE NI-FGEN does not apply a digital filter.

Default Value: VI_FALSE

NIFGEN_ATTRIBUTE_DIGITAL_FILTER_INTERPOLATION_FACTOR

Specific Attribute

Numeric Value Data Type Access Applies to Coercion High-Level Functions
1150218 ViReal64 R/W N/A None None

Description

Specifies the interpolation factor when the digital filter is enabled. If you do not set this attribute directly, NI-FGEN automatically selects the maximum interpolation factor allowed for the current sample rate. Valid values are 2, 4, and 8.

Note:  You cannot change this property while the device is generating a waveform. If you want to change the device configuration, call the niFgen_AbortGeneration function or wait for the generation to complete.

NIFGEN_ATTRIBUTE_FLATNESS_CORRECTION_ENABLED

Specific Attribute

Numeric Value Data Type Access Applies to Coercion High-Level Functions
1150323 ViBoolean R/W N/A None None

Description

Specifies whether flatness correction is enabled. When flatness correction is enabled, the signal generator applies a flatness correction factor to the generated sine wave to ensure the same output power level at all frequencies.

Set this attribute to VI_FALSE when performing flatness calibration.

Defined Values

VI_TRUE Enables flatness correction.
VI_FALSE Disables flatness correction.

NIFGEN_ATTRIBUTE_ANALOG_DATA_MASK

Specific Attribute

Numeric Value Data
type
Access Applies to Coercion High Level Functions
1150234 ViInt32 R/W N/A None None

Description

Specifies the mask to apply to the analog output data. The masked data is replaced with the data in the NIFGEN_ATTRIBUTE_ANALOG_STATIC_VALUE attribute.

NIFGEN_ATTRIBUTE_ANALOG_STATIC_VALUE

Specific Attribute

Numeric Value Data
type
Access Applies to Coercion High Level Functions
1150235 ViInt32 R/W N/A None None

Description

Specifies the static value that replaces data masked by the NIFGEN_ATTRIBUTE_ANALOG_DATA_MASK attribute.

NIFGEN_ATTRIBUTE_DIGITAL_DATA_MASK

Specific Attribute

Numeric Value Data
type
Access Applies to Coercion High Level Functions
1150236 ViInt32 R/W N/A None None

Description

Specifies the mask to apply to the output on the digital connector. The masked data is replaced with the data in the NIFGEN_ATTRIBUTE_DIGITAL_STATIC_VALUE attribute.

NIFGEN_ATTRIBUTE_DIGITAL_STATIC_VALUE

Specific Attribute

Numeric Value Data
type
Access Applies to Coercion High Level Functions
1150237 ViInt32 R/W N/A None None

Description

Specifies the static value that replaces data masked by the NIFGEN_ATTRIBUTE_DIGITAL_DATA_MASK attribute.

NIFGEN_ATTRIBUTE_AUX_POWER_ENABLED

Specific Attribute

Numeric Value Data Type Access Applies to Coercion High-Level Functions
1150411 ViBoolean R/W N/A None None

Description

Controls the specified auxiliary power pin.

Defined Values

VI_TRUE Energizes the auxiliary power when the session is committed.
VI_FALSE The power pin of the connector outputs no power.

Default Value: VI_FALSE

NIFGEN_ATTRIBUTE_DIGITAL_PATTERN_ENABLED

Specific Attribute

Numeric Value Data Type Access Applies to Coercion High-Level Functions
1150101 ViBoolean R/W N/A None None

Description

Specifies whether the signal generator generates a digital pattern corresponding to the output signal.

Defined Values

VI_TRUE Enables digital pattern output.
VI_FALSE Disables digital pattern output.

NIFGEN_ATTRIBUTE_IDLE_BEHAVIOR

Specific Attribute

Numeric Value Data
type
Access Applies to Coercion High Level Functions
1150377 ViInt32 R/W N/A None None

Description

Specifies the behavior of the output signal during the Idle state.

Note:  You cannot set this attribute while the device is generating a waveform. If you want to change the device configuration, call the niFgen_AbortGeneration function or wait for the generation to complete.

Defined Values

NIFGEN_VAL_HOLD_LAST_VALUE While in the Idle state, the output signal remains at the last voltage generated prior to entering the Idle state.
NIFGEN_VAL_JUMP_TO_VALUE While in the Idle state, the output signal remains at the value configured in the NIFGEN_ATTRIBUTE_IDLE_VALUE attribute.

NIFGEN_ATTRIBUTE_IDLE_VALUE

Specific Attribute

Numeric Value Data
type
Access Applies to Coercion High Level Functions
1150378 ViInt32 R/W N/A None None

Description

Specifies the value to generate in the Idle state. You must set the NIFGEN_ATTRIBUTE_IDLE_BEHAVIOR attribute to NIFGEN_VAL_JUMP_TO_VALUE to use this attribute.

Note:  You cannot change this attribute while the device is generating a waveform. If you want to change the device configuration, call the niFgen_AbortGeneration function or wait for the generation to complete.

NIFGEN_ATTRIBUTE_WAIT_BEHAVIOR

Specific Attribute

Numeric Value Data
type
Access Applies to Coercion High Level Functions
1150379 ViInt32 R/W N/A None None

Description

Specifies the behavior of the output while the device is waiting for a Script trigger or executing a wait instruction.

Note:  You cannot set this attribute while the device is generating a waveform. If you want to change the device configuration, call the niFgen_AbortGeneration function or wait for the generation to complete.

Defined Values

NIFGEN_VAL_HOLD_LAST_VALUE (400L) While in a Wait state, the output signal remains at the last voltage generated prior to entering the Wait state.
NIFGEN_VAL_JUMP_TO_VALUE (401L) While in a Wait state, the output signal remains at the value configured in the NIFGEN_ATTRIBUTE_WAIT_VALUE attribute.

NIFGEN_ATTRIBUTE_WAIT_VALUE

Specific Attribute

Numeric Value Data
type
Access Applies to Coercion High Level Functions
1150380 ViInt32 R/W N/A None None

Description

Specifies the value to generate while waiting. You must set the NIFGEN_ATTRIBUTE_WAIT_BEHAVIOR attribute to NIFGEN_VAL_JUMP_TO_VALUE to use this attribute.

Note:  You cannot set this attribute while the device is generating a waveform. If you want to change the device configuration, call the niFgen_AbortGeneration function or wait for the generation to complete.

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