Example Code

Jump to Last Array Element on a Touch Panel

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 example demonstrates how to jump programmatically to the first or last element of an array indicator.

 

Description

When using an array in a LabVIEW Touch Panel application, you cannot use the Show Last Element shortcut in the context menue. Although you can change the index value to scroll through the array, you cannot jump directly to the end.

This VI allows the user to jump to the first or last element of an array by clicking a button.

 

Requirements

 Software

  • LabVIEW Base Development System 2012 (or compatible)
  • If running in a Real-Time context, you will need the LabVIEW Real-Time Module 2012 (or compatible)

 Hardware

  • No hardware is necessary to use this example VI

 

Steps to Implement or Execute Code

  1. Download and open the attached VI
  2. Run the program

 

Additional Information or References

Jump Programmatically To The First or Last Array Element - Front Panel.png

 

Jump Programmatically To The First or Last Array Element - Block Diagram.png

 

**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text ‘NIVerified’. Read here for more information about the new Example Guidelines and Community Platform.**
Jennifer R.
National Instruments
Applications Engineer

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