Example Code

Programmatically and Dynamically Switch Between Two VIs

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

Coding that exemplifies how to switch dynamically between two front panels of different VIs.

 

Description

These two VIs, if located in the same folder, will switch between the two of them when you press the Boolean on the front panel. This is done programmatically. Each VI calls the other, and bring its front panel to the front.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code
1. Run one of the VIs
2. Select the Boolean control
3. When the second VI is open, select its respective Boolean control.
4. Stop both VIs by using the respective Stop button.


Additional Information or References

First Screen

First Screen.png

Second Screen

Second Screen.png

 

Jeff | LabVIEW Software Engineer

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