Example Code

NI-FGEN: Changing Arbitrary Waveform on the Fly

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Hardware

  • Modular Instrumentation

    Software

  • LabVIEW

    Driver

  • Other

Code and Documents

Attachment

Overview

This VI allows  to change the parameters of the arbitrary waveform or output a new waveform.

 

Description

To change the parameters of the arbitrary waveform or output a new waveform you will need to use the following steps:
1. Abort the generation by using the niFGEN Abort Generation.vi.
2. Before you load the new arbitrary waveform to memory you will need to clear the old information using the niFGEN Clear Arbitrary Memory.vi.
3. Load the new waveform. The picture below uses the niFGEN Util Create Waveform Data.vi to create the waveform and the niFGEN Create Waveform (DBL).vi to load the waveform into the arbitrary waveform generator's memory.
4. If needed, create a new arbitrary sequence.
5. Configure the arbitrary sequence.
6. Use the niFGEN Initiate Generation.vi to restart the generation.

 

Requirement

Software:

  Labview 2013 (or compatible)

  NI-FGEN driver which is compatible with your hardware and version of LabVIEW

Hardware:

  NI-FGEN Device

 

Steps to Implement or Execute Code

1. Select the name of your FGEN device
2. Run the VI

 

Additional Information or References

 Block Diagram

133.png

**This document has been updated to meet the current required format for the NI Code Exchange.**

Regards,

Sara Lewandroski
Applications Engineer | National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.