10-03-2019 04:27 AM
Dear All,
I have a mainVI, which loads several subVIs in a random (user defined) order dynamically. Currently my subVIs run a for loop 1..10 for testing. I have the conditional terminal enabled, connected a stop button to that, to be able to stop the running of the subVI. If I run the subVI standalone, of course it works perfectly.
However, if I load and run it dynamically from the mainVI, in sync mode (Call By Reference, and also load the subVI's front panel into a panel), event handling is killed in both the mainVI and the subVI: I can't press any button neither in the mainVI's front panel, nor the stop button of the subVI loaded into the panel. My goal is to show the process implemented in the subVI for the user, but also to be able to break the execution of the subVI, if necessary. The reason why I would like to separate the functionality into subVIs is that there are many different tests, implemented and maintained by several developers, so e.g. one big functionalglobal wouldn't fit.
Async mode doesn't fit my needs, because the user should see continueously what happens in the subVI (it performs some measurings / tests). So except this event blocking, this would be a perfect solution.
Could anyone suggest a good solution / fix here? Thanks in advance!
I use LV2015
Solved! Go to Solution.
10-03-2019 04:30 AM
10-03-2019 05:19 AM - edited 10-03-2019 05:19 AM
Do you have the UI events set to "Lock Front Panel until Event is handled"?
That would do it.
10-03-2019 06:12 AM
Dear cbutcher,
thanks for the quick reply! I have prepared a simple example, and it works. Strange is that if I run the subVI from my working testproject in the real one, it doesn't work. It seems that I have some problem in my real mainVI, still after I have replaced the affected loop content. I will do more tests. Thank you!
10-03-2019 07:02 AM
I can say only Thank you, Sir!
10-03-2019 07:19 AM
No Problem.
Have run into that one on many occasions. It always seems like it's caused by something else, so I thought it might be worth a stab in the dark.
10-03-2019 11:37 AM - edited 10-03-2019 11:39 AM
@Intaris wrote:
No Problem.
Have run into that one on many occasions. It always seems like it's caused by something else, so I thought it might be worth a stab in the dark.
I've never run into an issue with an unresponsive UI where the actual solution was to unlock the front panel. It seemed that I always found a way without resorting to that. I consider unlocking the front panel to be a "workaround" so if you could give me an example or two where there are no other alternatives to unlocking it, I could learn something.
I'll be the first to admit that maybe my programming isn't complex enough to ever run into this issue.
Thanks!