From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

View All VI's in Memory and Their Execution State

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 shows the user how to use LabVIEW to dynamically view which VIs are in memory and their execution state.

 

Description

This example allow user to view all VIs in memory and their execution state with Property Node. To implement this function,

  1. Drop a VI Reference Server on the block diagram and change its value to "This Application."
  2. Right-click the VI Reference Server and click Create >> Property for Application Class >> Application >> All VIs In Memory.
  3. Now drop down a For Loop, this allows us to go through all the VIs in memory. Make sure indexing is enabled.
  4. Within the loop use an Open VI Reference and right-click it to create a Property for VI Class then navigate to Execution >> State.
  5. Connect the wires as seen in the attached VI and add the appropriate indicators.
  6. Close the References.

 

Requirements

  • LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Run the VI.
  2. The VIs that are open their execution state will be displayed on the Front Panel.

 

Additional Information or References

Front Panel

VIs in mem.jpg

VI Snippet

1.png

 

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

Applications Engineer
National Instruments

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

Comments
Benjamin38
NI Employee (retired)
on

This is fantastic code!!!!  GENIUS! 

Regards,

Ben N.
Applications Engineering
ni.com/support
Benjamin38
NI Employee (retired)
on

Your code blew my mind

Regards,

Ben N.
Applications Engineering
ni.com/support
RJ_15
Member
Member
on

Please close the references !!!

Not applicable
on

Wonderfull!!! Simple and clean...!!!