Example Code

Programmatically Determine if a Sub-VI or VI is Running in 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 demonstrates how to programmatically determine if a sub-VI or VI is running on your computer.

 

Requirement

LabVIEW Full Development System 2012 or compatible

 

Steps to Implement or Execute Code

  1. Enter the path of the VI to determine its status
  2. Run the VI, The VI will return the following Execution States:
    Bad—VI has errors and cannot execute or VI is not currently running
    Idle—VI is not running, but is in memory.
    Run top level—VI is the top-level VI in an active hierarchy.
    Running—VI is reserved for execution by one or more active top-level VIs.

Additional Information or References

VI Block Diagram

3580.PNG

 

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

 

Aaron W.
National Instruments
CLA, CTA and CPI

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

Comments
comrade
Active Participant
Active Participant
on

And to determine whether a VI with Exec.State "Running" as actually being run at the time, try this:

https://lavag.org/topic/16660-how-to-get-actual-vi-execution-state/#entry109694