Example Code

FGEN Arbitrary Waveform: Switch Waveforms While Generating

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 example allows to switch between two waveforms without stopping generation.

 

Description

This example builds on the shipping example Fgen Arbitrary Waveform.vi. It allows you to switch between two waveforms without stopping generation. By writing the second waveform to memory while the first waveform generation is active, the second waveform will be generated when the FGEN card regenerates from the memory that has been overwritten. This can be useful for FGEN cards that do not support scripting or streaming (such as the PCI/PXI-5412) and need more waveform data than can fit on the memory of the card. This example should work on the 5412, 5421, 5422, and 5441.

 

Requirement

Software:
  Labview 2012 (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

140.png

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

 

National Instruments

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