Example Code

Spawning reentrant subVIs in a loop without blocking utilizing VI Server

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:

Call a SubVI dynamically without locking the main loop.

 

Description:

This VI demonstrate how to use the invoke nodes to run and display a vi dynamically without hanging the main application until it finishes.

 

Requirements:
1. LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code:
1. Place the name of the Reentrant VI you wish to run. (By default, there is a Reentrant SubVI that comes with the example. Make sure the SubVI is saved in the same folder as the example VI).
2. Select How many instances of the SubVI you wish to open.
3. Run the VI.
4. Watch how the SubVIs executes while the main VI continues to run.
5. Stop the main VI to release the instances from memory.

 

Additional Information or References: 

undefined
*If using another SubVI. Make sure to configure it to be reentrant.
http://digital.ni.com/public.nsf/allkb/98847B4E4C715E6D86256C59006B57CC

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

Stephen B

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

Comments
Todd S.
NI Employee (retired)
on

Added "LabVIEW" to the tags so it would show up on the main page.  Thanks for posting!

Todd S.
LabVIEW Community Manager
National Instruments
Tariff Impact Update Learn more