LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Start one VI from another

Hi everybody,

I want to start a VI so that the original VI keeps running! If I use a
Sub VI the Main VI waits until the SubVI has finished. I can start the
second VI manually so that both VIs run simultaniously. How can I start
the second VI from the first???

Regards

Martin


[See first answer for additional information]
0 Kudos
Message 1 of 4
(2,754 Views)
[Attachment(s) for question]
0 Kudos
Message 2 of 4
(2,754 Views)
Hi Martin,

just use a seperate thread to do that. Therefore you place an additional
while loop into the diagram and move the button's terminal in it. When
the button is pressed open the Sub-VI and the Main-Loop will not be
affected. To get notified when the Main-Loop exit's you can use a
notifier to get the state. If the Main-Loop destroid this notifier the
other loop can also quit.

I hope that will help you
Henrik

Martin Eis schrieb:
>
> Hi everybody,
>
> I want to start a VI so that the original VI keeps running! If I use a
> Sub VI the Main VI waits until the SubVI has finished. I can start the
> second VI manually so that both VIs run simultaniously. How can I start
> the second VI from the first???
>
> Regards
>
> Martin
0 Kudos
Message 3 of 4
(2,754 Views)
If you start the second VI from within a loop of the first, then that loop
will not proceed to the next iteration until the second VI finishes. If you
simply want both VIs to start running at the same time, you can put the
second VI outside the loop in your first VI.

Alternatively, you can use VI server to load the VI into memory, open its
front panel and run it at an arbitrary time after the first VI starts, but
the first method is simpler if you don't need the extra flexibility.

Martin Eis wrote in message
news:3A7E77AA.7438D07C@bmw.de...
> Hi everybody,
>
> I want to start a VI so that the original VI keeps running! If I use a
> Sub VI the Main VI waits until the SubVI has finished. I can start the
> second VI manually so that both VIs r
un simultaniously. How can I start
> the second VI from the first???
0 Kudos
Message 4 of 4
(2,754 Views)