LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I would like to know how i can clear a xy graph after a certain amount of time, If anyone has a sample vi, and explanations, it will be greatly appreciated

Hi
just send an empty array of graphs (or an empty graph) to the xy graph
greetings from the Netherlands
0 Kudos
Message 2 of 5
(2,878 Views)
No need of example, just wire an emty array to your graph or use a local or global variable to give it an emty array value and it's done.
0 Kudos
Message 3 of 5
(2,878 Views)
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.
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.
Thanks
0 Kudos
Message 4 of 5
(2,878 Views)
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]
0 Kudos
Message 5 of 5
(2,878 Views)