Example Code

Cycle Through Array 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

Download All

Overview

This VI allows for programmatic control over visible array index on the front panel. The example uses Boolean buttons with an event structure but the same logic could be used to implement this programmatically.

An example of a use for this would be for cycling through an array of clusters containing calibration or test parameters. Once a test is completed/ calibration is deployed the user is invited to configure the next whilst saving space on the front panel.

 

Description

This VI is an example of programmatic control over the top left displayed array index (if you are only showing one element of the array then you can cycle through individual elements). This example uses an event structure to allow control through Boolean buttons.

It is set up so that the array is circular. i.e. if you press "Next" on the last element you will be shown the first element.

 

Requirements

  • LabVIEW 2013 (or compatible)

 

Steps to Implement or Execute Code

  1. Run the VI.
  2. Click on "Previous" or "Next" button to cycle through the array.
  3. Click "Exit" to stop this VI.

 

Additional Information or References

Front Pane

FP.png

Block Diagram

sni.png

 

 

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

Tim, CLD, CTD
National Instruments (UK & Ireland)
________________________________________________
"No problem is insoluble in all conceivable circumstances"

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