ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Example Code

Plotting Data on the Nth Loop Iteration

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

Code that plots new random data on a specific amount of iterations.

 

Description

If your system requirements stipulate that data should be amassed from multiple acquisitions then plotted only when a certain number of acquisitions have been made, you can use the remainder of the iteration count to only plot on the 5th, 200th, etc. multiples of the loop count. This might require you to accumulate data in a shift register between writes. This code demonstrates this idea.

 

Requirements

1. LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code
1. Run the VI
2. Monitor the Size of Array indicator
3. When desired, finish the execution with the Stop button

 

Additional Information or References: 

 

Conditional Plotting.png

 

Verne D. // Software R&D // National Instruments

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