02-19-2015 12:20 PM
I am currently working with a multi-tabbed vi. After the Tab 3 vi is executed, the program automatically switches to Tab 4. I want this Tab 4 vi to automatically run at this point. I have tried the RunOnOpen tool but it doesn't seem to work for my application... perhaps I am not initializing it properly?
How can I get an individual tab to run automatically after a tab control event?
02-19-2015 12:29 PM
02-19-2015 12:32 PM
Alright, I have posted an example of what I want to do... I want tab 2 to "run" as soon as tab 1 is finished and flips to tab 2. I hope that I am making sense...
02-19-2015 12:44 PM
02-19-2015 12:51 PM
This sounds like a good place for a State Machine. Regardless, you need a loop that your case structure goes into.
02-19-2015 12:55 PM
Here are images of my vi. I don't know how else to describe that when I have Tab 1 active, and click run, Tab 1 is the only part that executes. If I have Tab 2 active, and click run, Tab 2 is the only part that executes...
What I am trying to do, while preserving the tab structure, is to have Tab 1 active, press Run, Tab 1 executes (including setting Tab 2 as the new active tab), and running Tab 2 without the need to physically press the Run button.
02-19-2015 12:55 PM
Front Panel - Page 2
02-19-2015 01:02 PM
Your VI is inside out. The while loop belongs on the outside. The case structure belongs inside.
02-19-2015 01:22 PM
02-19-2015 01:59 PM
I don't think I can invert their order. You see, this is just an EXAMPLE vi of what I am trying to accomplish using a much more complex vi. In my complex vi I have four tabs which have portions of code that are reliant on a user pressing an "ok, execute" button, among other things. I want to be able to open Tab 1 and execute it when I am ready, then switch to Tab 2 when Tab 1 is done and execute Tab 2, etc. However, I wanted things to be different between Tabs 3 and 4. I wanted the switching tabs and "run" to be automatic, because the time it takes for Tab 3 to execute is about 6 hours and there will not be a user sitting there waiting to hit the "run" button on Tab 4 once Tab 3 is done executing.
All I wanted to do, was be able to keep my code seperated using tabs. That may sound ridiculous, I don't know, I am fairly new to labview and I THOUGHT I had been using tabs the proper way. I guess not.
At this point I am ready to just move my code on Tab 4 to Tab 3 and be done with it.