Programmatically Check If a VI is Running

Updated Dec 21, 2022



  • LabVIEW

  • How can I programmatically determine if a VI is running in LabVIEW?
  • What are the different execution states of a VI?

You can check the runtime status of a VI by using a VI Property Node. To determine the status, check the Execution State of the VI in the following way: 
  1. Place an Open VI Reference function from the Applications Control Palette. 
  2. Right-click the VI Path input of the Open VI Reference and select Create»Control or Create»Constant.
  3. Place a Property Node from the Applications Control Palette. Wire the VI Reference output of the Open VI Reference to the Reference input on the Property Node.  On the Property Node, left-click on Property and select Execution»State
  4. Right-click the Property Node output of Execution State and select Create»Indicator
  5. Place a Close Reference VI from the Applications Control Palette. 
  6. Wire the block diagram similar to the following snippet:

The following are the possible values of the Execution:State property: 
  • 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

If the VI path is not a valid path, the VI will return an error.