I have wrriten a Main vi that uses multiple loops. But for the sake of discussion, let's keep it simple at 2 loops. Master/Slave. In the slave loop, there is the possibility of a VI FP being opened during operation. When opened, the Master loop is of course continuing to run while the slave is waiting for this pop up VI to close. However, the controls (all placed in the Master loop) are technically frozen and incapable of being used. Now, I understand the risks of those controls still being accessible. Events would take place, but the slave could never process them due to the pop up vi still being open. But let's say you are a savvy programmer and are aware of those risks so you created a separate loop to handle pop ups for this very reason so as to allow you to still have FP control access on your main FP. How does one go about doing this? Are there settings that need setting? Or is there a more savvy programmer way to do this? Like changing that VI to its own separate .exe and just calling it to open and using the Shared Variable system to transfer data between the two? I hope I've described the scenario well enough to garner responses and not further questions?
Solved! Go to Solution.
putting all text into one bulky paragraph makes it hard to read…
From what I get it seems you have problems to set up a proper producer-consumer scheme. Or you need to avoid modal frontpanels…
If it is something else you should attach your VI(s)!
It sounds like your pop up subVI is set to be modal. That makes it frontmost and will block any interaction with the other windows.
Look under File >> VI properties >> Windows Appearance. You may want to try floating instead of modal.
Appreciate the responses. Sorry about the big chunky Paragraph, I will definitely try to avoid that in the future.
I made the floating modification and the controls only respond until after the VI is closed. I'm wondering if it's because I have two event loops running. (Probably should have mentioned that) Unfortunately, I cannot share the VIs due to government proprietary blah blah blah. You understand. So I made a very quick VI giving a very brief explanation of what's going on. You'll have to trust me that there are no "bugs." I've also attached an image of the pop up VI's settings.
Edit: I just now noticed my comment on my image. It's not Modal, it's floating. Sorry about that.
check your event case settings.
Most probably you have set them to the default blocking behaviour when an event is handled…
Read the LabVIEW help for event structures!
Seeing a VI structure and how you are using event structures makes me think you are having another issue.
Event cases, by default, have a setting that says "Lock Panel (defer processing of user actions) until the case for this event completes." So if you have an event case that launches a subVI, but that subVI is long running, the event case does not complete until you finally end the subVI. If you have that box checked, it is going to lock the front panel where you launched the subVI.
See if you have that box checked for your subVI event case, and if you do, try unchecking it.
One thing you'll have to watch out for is that if you keep firing the event that launched the subVI, you are going to build up all of those events in a queue. Once you end your subVI, you'll see it pop up again, and again, and again until you finall exhaust all of the triggered events.
You should only have one event structure.
Not actually true. As long as you know what you are doing, you can having multiple event structures. It just isn't recommended for new users because they are more likely to get into trouble
Having an event structure inside another event structure is universally a bad idea.
Having event cases with long running code inside or embedded while loops you can't control is usually a bad idea.
Not understanding how the "Lock Panel" checkbox works is what usually gets new programmers in trouble.
Anyone using event structures should read Caveats and Recommendations when Using Events in LabVIEW - LabVIEW 2015 Help
Ah man... I've been regulated back to a "new user"...
Anyways, the help was very much appreciated! That fixed my issue. Thank you!
"Not understanding how the "Lock Panel" checkbox works is what usually gets new programmers in trouble"
Thanks RavensFan. This statement have saved me after a whole day of struggle. Kudos