04-18-2015 02:19 PM
Something doesn't sound right.
Try simplifying your VI to the basics. Then attach that.
Have you gotten the example to run okay?
04-18-2015 02:27 PM
Here it goes. I'm afraid some vision module might be needed.. the example works but it doesn't work for my case.
04-18-2015 03:08 PM
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
04-18-2015 03:10 PM
I changed your VI so that it didn't use IMAQ which I don't have. It worked okay for me.
04-18-2015 03:15 PM - edited 04-18-2015 03:17 PM
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
04-18-2015 03:22 PM
04-18-2015 03:24 PM - edited 04-18-2015 03:32 PM
yes, 'modal'
@edit: it solved the problem, thanks!
04-18-2015 03:34 PM
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.
04-18-2015 03:37 PM - edited 04-18-2015 03:41 PM
Uh, found the solution! Thank you guys! that was very helpful!