Example Code

Programmatically Fire Events for a VI Inside a Sub VI Front Panel 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 VI Programmatically Fire Events for a VI Inside a Sub VI Front Panel

 

Description

When designing an application, we wants to have different user interfaces of different applications. Such behavior enables us to change the application we wants to fire, using our main application as a template which fires our desired VI (which implements as a subVI). This example shows how to launch a subVI and put its front panel inside a sub panel on the main VI. Then it shows how to fire events within that subVI.

 

Requirements

LabVIEW 2012 or compatible

 

Steps to Implement or Execute Code

1. Run the V

2. Click Generate Event to fire a Value Change event inside the VI in the sub panel

3. Click the Stop button in the sub panel to stop both VI’s

 

Additional Information or References

VI Block Diagram

Programatically Fire Events for a VI Inside a Sub Panel BD.jpg

Programatically Fire Events for a VI Inside a Sub Panel 2 BD.jpg

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

Scott G.
AE Specialist
National Instruments

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

Comments
josborne
Active Participant
Active Participant
on

Hmmm... this is helpful.  I am wondering how to do the opposite.  I want to fire events in the host VI programmatically from the current sbupanel.  Any idea how to do this?  The reason is because I want to be able to switch subpanels from the current subpanel.

http://www.medicollector.com