wrote in message news:8u6082$t55$1@nnrp1.deja.com...
> I am generating data in an sub-vi's loop. How can
> I display this data in an chart during generation.
> The chart in the sub-vi works fine, it doesn't in
> upper hirarchies.
If you generate the whole dataset in the sub-VI and pass the data back to
the caller when the VI finishes executing, obviously the chart on the front
panel of the caller will only be updated when the whole dataset is complete.
The simplest solution to this if you absolutely require the chart to be
updated progressively is to have the sub-VI calculate just one, or perhaps a
few, datapoints each time it's called and then put the subVI, along with the
chart, into a while loop within the caller that runs until the datase
t is
complete.
If it is necessary that the subVI runs "single-shot" to produce the entire
dataset AND you need the front panel chart updating, you can use VI server
to allow your subVI to change the data in the chart indicator of the caller.
Make sure though that you don't update the caller any more than, say, ten
times per second or you could find the CPU overhead just to update the panel
is greater than the CPU overhead to generate the data in the first place. VI
server is well documented and there's a whole directory of examples supplied
with Labview to show how to use it.
Alternatively, if you only require an indication on the caller front panel
that the system is still "live" you could make a progress bar that the subVI
updates via VI server every second. Since this involves just the passing of
a single int rather than possibly a large array of doubles (depending on how
you do the chart update) the overhead of the progress bar is obviously much
less.