LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

opening subvi so the main vi is active

Solved!
Go to solution

Something doesn't sound right.

 

Try simplifying your VI to the basics.  Then attach that.

 

Have you gotten the example to run okay?

0 Kudos
Message 11 of 19
(1,242 Views)

Here it goes. I'm afraid some vision module might be needed.. the example works but it doesn't work for my case.

Download All
0 Kudos
Message 12 of 19
(1,238 Views)

I think I know what is wrong.  I didn't "see the forest for the trees", as your main VI was too big to fit on my screen.  So I didn't realize that the Call and Forget was inside the While loop.

 

Let's assume that the Call and Forget actually works as designed, and won't block the caller.  You run the first iteration of the While, Call and Forget, and finish the While.  You now come to the second iteration, try to run Call and Forget, but you can't because the function you are Calling is not reentrant, so you can't call it until you finish "using" it.  Could that be your issue?  If so, you should be able to demonstrate this by putting a probe on (I was going to say "the error line near the end of the While loop, but there is no error line ... there should be error lines!) --- never mind, wire an indicator to the index, "i" -- I'll bet it says "1" when it gets "stuck", suggesting that it has, indeed, finished one loop and is "blocked" by your Async Call in the second.  

 

Bob Schor

0 Kudos
Message 13 of 19
(1,213 Views)

I changed your VI so that it didn't use IMAQ which I don't have.  It worked okay for me.

Download All
0 Kudos
Message 14 of 19
(1,211 Views)

I just tested the files you attached and run it. The subVI opened but it was blocking the mainVI which was inactive until I clicked 'close' button on subVI.


@edit: I see what you mean that the counter still counts but the user cannot perform any action on mainVI

0 Kudos
Message 15 of 19
(1,204 Views)
Solution
Accepted by topic author thor91
How is the subVIs front panel configured? Modal?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

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

For help with grief and grieving.
Message 16 of 19
(1,197 Views)

yes, 'modal'

@edit: it solved the problem, thanks!

0 Kudos
Message 17 of 19
(1,191 Views)

That is your problem.  Modal VI's block access to the other VI windows.

 

If you look at the example, you'll see teh subVI is set for Default Window Behavior and not modal in the Window Appearance under VI properties.

0 Kudos
Message 18 of 19
(1,179 Views)

Uh, found the solution! Thank you guys! that was very helpful! 

0 Kudos
Message 19 of 19
(1,175 Views)