NI-FGEN Arbitrary Waveform Generator Express VI

LabView FGEN

NI-FGEN Arbitrary Waveform Generator Express VI

Configures and runs National Instruments signal generators using NI-FGEN in Arbitrary Waveform mode.

For continuous generation, you must place at least two NI-FGEN Express (Arb) Vis on the block diagram for successful arbitrary waveform generation. Select Start continuous for the Generation Mode in the first Express VI to start the continuous waveform generation. Select Stop continuous for the Generation Mode in the final Express VI to abort waveform generation and close the NI-FGEN device handle.

When placed in a loop, the Express VI downloads new data in every loop iteration.

Dialog Box Options
Block Diagram Inputs
Block Diagram Outputs

Dialog Box Options

ParameterDescription
ConfigurationContains the following options:
  • Device—Specifies the signal generator used. This ring control lists all NI signal generators installed on this computer that can be used by this Express VI. If you relaunch the VI and the selected signal generator is dimmed, it is no longer available.
  • Disable output on close—Specifies the behavior of the output enable relay when the device resources to the selected signal generator are released.

    Disabling the output grounds the output connector; otherwise, a constant DC voltage representing the last data point generated before stopping the waveform may be present.
  • Generation Mode—Specifies the generation mode of the function generator. Contains the following options:
    • Finite—Configures the signal generator to generate the waveform one time. In this generation mode, the Express VI waits until waveform generation is complete or until the time specified by Max time (s) has elapsed, whichever occurs first.
    • Start continuous—Configures the signal generator to generate the waveform continuously and starts the generation. In this mode, the Express VI returns immediately after starting the generation. To stop the generation, drop another instance of the Express VI on the block diagram, select the same signal generator, and configure it to Stop continuous.
    • Stop continuous—Specifies to stop a continuous waveform generation.
  • Data Source—Configures the data source of the signal generator. Contains the following options:
    • Data at VI Terminal—Sets the Express VI to receive its waveform data from the diagram input connector on the VI.

      The VI that calls this Express VI must run before opening the Express VI for data to be present on the Express VI input connector. If no data is present on this input connector or the Express VI has not been configured previously, the VI uses Demo Data to validate the configuration.
    • Waveform from file—Select this control to generate a waveform stored in a Hierarchical Waveform Storage (HWS) file. HWS files can be created by the NI-HWS API or the NI Analog Waveform Editor.

      Use the Waveform file selector to specify the file to load.
    • Waveform file selector—Select the file that contains the waveform to generate. Use the New waveform and Edit waveform options to easily create and edit waveforms using the NI Analog Waveform Editor.
  • Output—Contains the following options:
    • Extract from waveform—Specifies whether settings for Sample rate (S/s), Gain, and Offset (V) should be extracted from the waveform or specified manually.

      When Extract from waveform is not selected, you must first normalize the data points to a range of -1.00 to +1.00.
    • Sample rate (S/s)—Specifies the sample rate with which the signal generator produces arbitrary waveforms.

      This control is disabled if the option Extract from waveform is selected. In this case, the control displays the extracted value to apply to the signal generator.
    • Gain—Specifies the factor by which the signal generator scales the data.

      When Extract from waveform is not selected, you must first normalize the data points to a range of -1.00 to +1.00. Use this control to scale the arbitrary waveform to other ranges. For example, to configure the output signal to range from -2.00 to +2.00 V, set Gain to 2.00.

      This control is disabled if the option Extract from waveform is selected. In this case, the control displays the extracted value to apply to the signal generator.
    • Offset (V)—Specifies the value the signal generator adds to the data.

      When Extract from waveform is not selected, you must first normalize the data points to a range of -1.00 to +1.00. Use this control to shift the arbitrary waveform range. For example, to configure the output signal to range from 0.00 to 2.00 V instead of -1.00 to 1.00 V, set Offset (V) to 1.00.

      This control is disabled if the option Extract from waveform is selected. In this case, the control displays the extracted value to apply to the signal generator.
    • Output impedance—Specifies the output impedance of the signal generator.
    • Load impedance—Specifies the load impedance. Using this control allows the signal generator to produce the correct output signal for the most common applications: high (>1 MΩ) load impedance or matched output and load impedance.
    • Filters enabled—Specifies whether the onboard analog and/or digital filters are enabled.
Trigger and TimingContains the following options:
  • Trigger type—Specifies the type of trigger to use for starting waveform generation. Selecting an Immediate trigger starts waveform generation as soon as all configuration settings are applied.
  • Trigger source—Specifies the trigger source. The signal generator waits for the specified trigger to start waveform generation.
  • Edge—Specifies whether to trigger on a rising edge or a falling edge of the trigger signal.
  • Update clock mode—Specifies the update clock to use. In Divide-Down sampling mode, the sample rate can only be set to certain frequencies, based on dividing down the update clock. However, in High-Resolution mode, the sample rate can be set to any value. In Automatic mode, NI-FGEN determines the correct update clock depending on the selected sample rate.
  • Reference clock source—Specifies the source of a 10 MHz reference clock signal. The function generator uses this reference clock source to derive output sample rates.
  • Sample clock output terminal—Specifies which front panel terminal, if any, the signal generator should use to export the Sample clock signal.

    Refer to the NI Signal Generators Help to determine which terminals are valid for each signal generator.
  • Max time (s)—Specifies the maximum time to wait for the finite waveform generation to complete.

Block Diagram Inputs

ParameterDescription
closeDetermines whether the driver session remains open when the VI finishes execution. Use this parameter for loop optimization by setting it to FALSE on all iterations other than the last iteration.
Note  This input is not intended to be used to share the session between Express Vis. If you have a loop containing multiple Express Vis that use the same device, you must wire in TRUE for this input.
dataSpecifies the arbitrary waveform to generate. This input is not available when using the Waveform from file option in the NI-FGEN Express (Arb) VI configuration page. If the Extract from waveform option is not checked in the configuration page, the data values must be in the range -1.0 to +1.0.
max time (sec)Specifies the maximum time to wait for the finite waveform generation to complete. If you set this value to -1, the VI waits indefinitely.
error inDescribes error conditions that occurred prior to running this Express VI.

Block Diagram Outputs

ParameterDescription
error outContains error information. If error in indicates that an error occurred before this Express VI ran, error out contains the same error information. Otherwise, it describes the error status that this Express VI produces.