Example Code

Retain Waveform Data on Waveform Graph Using LabVIEW

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.

    Software

  • LabVIEW

Code and Documents

Attachment

 

Overview

This program creates an array of 100 random elements, plots the data to a waveform graph, and retains the previously plotted data as it creates and plots a new array of 100 elements.

 

Description

The outside While Loop allows this program to run until the user presses the STOP button, and is used to retain the previously plotted data

using a shift register.  The inside For Loop indexes through the elements of the blank array, creating the new data to plot.

This can be utilized to see differences in data graphically or to compare instances of the same measurement or process.

 

Requirements

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Run the VI
  2. Check the behavior of the plots in the waveform graph.

 

Additional Information or References

 VI Snippet of Block Diagram

sni.png

 

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

 

------------------------------------------------------------------------------------------

Jon F.
Technical Support Engineer
National Instruments

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