matrix wrote in message
news:506500000005000000102D0000-991728092000@quiq.com...
> I tried that, attached is the vi.
> My actual aim is to allow data to be plotted to the graph 4 24 hours,
> after which, it should clear the chart and start at the beginning
> agin.
> Does this vi do this.
No. The attached is the simplest way of modifying it to do as you want. I've
sped things up a little to make it obvious.
> Will the array be able to keep all the data, is there a way i can do
> it without arrays, i.e. kind of dynamically, and therefore try to save
> memory usage.
You already are. You're making the arrays as you go along so only the memory
needed for the data that's in the plot is in use at any one time. To do it
without storing
arrays at all you'd need to keep retrieving the data from
the XYgraph, adding the new datapoint and writing it back. Messy and I
suspect incredibly inefficient.
You're going to use the memory in any case- a better option would be to
pre-initialise an array and fill it slowly. At the end of each 24 hour block
zap all the data and start again without destroying and recreating the
arrays. Or if you're only doing the 24 hour wipes to save memory, simply
start again at the start of the buffer woithout erasing the previous data
and you always have 24 hours of data to liik at once the system's running.
Do a search for keywords like "pre initialise" or "circular buffer" on
ni.com
[Attachment xy-time_modified.vi, see below]