12-08-2008 02:19 PM
hello
i got a program call a.vi and b.vi
I would like to have a major c.vi for both a.vi and b.vi
in other words, when I open c.vi there is a button to run a.vi and b.vi.
any suggestion on how to implement.?
12-08-2008 02:27 PM
make a.vi and b.vi be sub-vis in c.
Then put each subvi in a case structure.
When the button is pressed on the front panel,
the boolean becomes true, and the subvi will run.
12-08-2008 02:39 PM
wiggy13 wrote:in other words, when I open c.vi there is a button to run a.vi and b.vi.
Sorry, do you want to run (1) "A or B" or (2) "A and B"? Please clarify.
For case 2, just place both subVIs in the same event case of an event structure that triggers when you press the button.
12-08-2008 04:05 PM
i would like to run a or b or both. I would like to have control windows that allow a or b both to run
12-08-2008 04:31 PM
So you have 4 possible cases:
A single boolean button would not be sufficient to select among 4 possibilities. 😄
Should they be able to both run at the same time or sequentially? How do the subVIs terminate?
12-08-2008 04:40 PM
they should be able to run at the same time or in sequence
for example a.vi takes data in module a
b.vi takes data in module b
12-08-2008 05:08 PM
So use two buttons and two independent while loops, each with an event structure. One for A and one for B. There are really many ways to do this and it really depends on the details what's the best solution.
Should you be able to close C while A and/or B keep running?
12-08-2008 05:17 PM
any sample ?