12-31-2014 06:05 AM
Hi, I am reposting this question as my previous one didn't resulted in any satisfactory conclusion.
I have attached my Vi's which are not working as expected. If I remove ONE subVi and its associated 3 controls and two indicators, the other one works just fine, but when I add two SUB Vis, it goes messy. I am trying to learn this way, I am sure it can be done many other ways, but please help me finding out the problem doing it this way as in my final MainVi, I would like to use 8 such sub Vis. Thanks.
Solved! Go to Solution.
12-31-2014 07:17 AM
Your main problem is DATA FLOW. A loop cannot iterate until EVERYTHING in it has completed. So, as you have it, you have to have both event structures execture before you can go back to look for the next event. So if you insist on having these subVIs, they need to be in seperate loops.
BTW, you can get away with a single subVI. Go into the VI properties and make it reentrant (preallocated clone). Then each call of your subVI will have its own memory space. A lot easier to maintain that way.
And I know you said you didn't want alternatives, but here's how you can do it all with a single event structure in your main loop.