|| 3 out of 5
How Do I Programmatically Open and Close a VI Within Another VI?
Primary Software Version:
Primary Software Fixed Version:
LabVIEW Development Systems>>LabVIEW Full Development System
I have a VI that I would like to programmatically open, view, and close while running a separate VI. Is this possible?
There are two possible ways to do this:
- Place the second VI as a subVI within the first. On the block diagram, right-click the subvi and select SubVI Node Setup. From there, you can select the two options Show Front Panel when called and Close afterwards if originally closed. These options will provide for the desired functionality.
- You can also programmatically obtain this by using VI Server References to call the needed VI. The picture below shows how you would use Open VI Reference, Invoke Nodes, and Close Reference to open a VI and run it programmatically from within another VI. You can see an example of this code at NI Community, linked below.
Related Links: KnowledgeBase 42NH4TUR: How Do I Stop a Running VI Programmatically? NI Community Example: Programmically Open a VI