LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

opening subvi so the main vi is active

Solved!
Go to solution

In the main program during execution when appropriate button is clicked subvi with a picture is called (chosen by case structure). The rest of the program (front panel) is blocked until the subvi window is closed - how can I open the subvi with a picture so it remains opened and the program goes further?

 

greetings,
Michal

0 Kudos
Message 1 of 19
(3,316 Views)

What does your code look like?

]When a subVI is called, the rest of the code in the line of execution isn't going to run until the subVI returns.  So is this subVI something like a separate front panel with a loop that you want to run in parallel with the rest of your main VI?  If so, you either need to call it in a way that doesn't block the rest of your code, or use the Asynchronous Call by Reference method.

0 Kudos
Message 2 of 19
(3,309 Views)

Thanks for quick response! That subVI returns nothing it is kind of additional window that presents the thermogram with chosen points. Yes it is a subVI in a while loop - it closes after stop condition (click on the stop button). Can you briefly explain how to use Asynchronous Call by Reference method so i can set some input to that subVI?

0 Kudos
Message 3 of 19
(3,298 Views)
You need a nonblocking dialog box. As RavensFan says the VI needs to be launched dynamically. Check the link in my signature, I wrote post about one possible implementation. What I show is just a simple "Are you sure..." kind of dialog, but it shows the basic process.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 19
(3,296 Views)

Search in the example finder for "asyncrhonous".  The Asyncrhonous Call and Forget.VI would be a good example for you.

Message 5 of 19
(3,291 Views)

I've done it exactly as in the example, thanks - but still the main front panel is blocked.. should I get rid of while loop in subVI? how closing it should be handled then?

0 Kudos
Message 6 of 19
(3,282 Views)

Please attach the main VI.

0 Kudos
Message 7 of 19
(3,276 Views)

is it enough for you or u need entire project?

0 Kudos
Message 8 of 19
(3,274 Views)

You forgot the Call and Forget setting (0x80) in the Open VI Reference.  Look again at the Example ...

 

Bob Schor

0 Kudos
Message 9 of 19
(3,261 Views)

I added the setting (x80) (copied it form example) but it is still blocking the further execution of the main VI until subVI is closed..

0 Kudos
Message 10 of 19
(3,245 Views)