> I have to start 4 VIs simultaneously that collect data and display it on the
> screen (wave chart). My questions are:
>
> - how do I start the VIs simultaneously?
> - how to switch between the VIs - while keep running the others at the
> background?
> - how do I refresh the screen when switching to another VI?
> --
There are a number of ways to do what you want, but not much information
to use to choose between them. First off, if the underlying driver that
is acquiring the data can be configured to share a trigger or otherwise
synchronize, then that will give the most synchronized results.
If this is just meant to be SW synchronized, then your choices are to
make the four calls short as possible, call them one after the other,
or place them in parallel and call them all at once. These are rather
similar assuming you have one CPU, only one can run at a time, and the
parallel case doesn't ensure which goes first whereas executing them
one after the other, you do know the order, but perhaps have bigger
gaps between the calls.
Another SW technique you can use is occurrences. Make the subVI call
wait on an occurrence that the top level diagram will set when it wants
the subVIs to measure the data. Have the top level diagram call all four
subVIs in parallel, then set the occurrence. Another thing that will be
helpful is to have the subVIs call Wait ms or wait on another occurrence
immediately after they have their data. This will give the other subVIs
time to finish. When all are finished, the top level diagram can set
the second occurrence and all four subVIs will return their data where
it can be processed, plotted, etc. Then loop back to call the subVIs
again.
A variation of this would be to have the four subVIs be four independent
VIs with their panels open, and another VI, subVI or top-level synchronises
them using an occurrence like described above.
Again, your implementation depends alot on what you mean by simultaneous.
There are no time constants mentioned, nor any mention of how the data is
being acquired.
Greg McKaskle