LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Opening a Sub VI from a Main VI

It's been a few years but I have another Labview application to work on and I'm just getting reacquainted with the project.

With regarding to opening a VI from another VI, I grabbed these two test files from the forums here.  On Event 2, when I delete the Sub VI file and then drop it back into the Event space, it no longer opens when clicking "Call SubVI" and I'm wondering what things broke when I delete it that have to be re-added?

0 Kudos
Message 1 of 6
(230 Views)

We have absolutely no idea what you are talking about!  Show us some LabVIEW code, please -- not all of us are mind-readers (we do have a few, but not many, and I'm not one of them ...).

 

Bob Schor

0 Kudos
Message 2 of 6
(214 Views)

Strange, I attached the two VIs but they didn't show up.  Let's dial back on the attitude and provide some grace. 😉

Download All
0 Kudos
Message 3 of 6
(211 Views)

Ah, the SubVI Node Setup was missing an option.  Somehow I missed that.

0 Kudos
Message 4 of 6
(196 Views)

One common use for an Event Structure is to sit "idle" waiting for the User to interact with the Front Panel by "changing something", i.e. pushing a Boolean button, entering a value in a Numeric Control, filling a String input with some text.  Until one of these "events" occurs, and if there is no "TimeOut" event, the Event Loop takes zero time from the rest of the program, but the instant LabVIEW handles a change in one of the monitored Events, the Event code runs and "soemthing happens".

 

A common use for Event Loops is to trigger a particular State of a State Machine.  To see an example of this, open LabVIEW, right-click "File", then "Nes .." (the second entry the DropDown list), and choose "From Template", "Design Patterns", :Producer/Consumer Design Pattern (Events)".

 

When dealing with multiple parallel Loops, like the Event Loop and the Sate Machine Loop, stopping all of them at the same time is a consideration.  Notice how the Stop Button stops both the Event Loop and the State Machine Loop when pressed.

 

Enjoy.

 

Bob Schor

0 Kudos
Message 5 of 6
(158 Views)

Thanks!

0 Kudos
Message 6 of 6
(134 Views)