LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timestamped charts with variable numbers of plots

I'm trying to generate an x-y plot to show some aquired data. Easy enough, but I don't know in advance of starting my measurements the number of instruments / transducers I'll be using.

So, I'm trying to generate a VI which will allow me to alter the number of plots which are shown, and generate a time stamp associated with each point (or with each scan of the transducers, not so important).

I've cracked most of it, apart from being able to generate the history of the chart; the chart buffer doesn't want to help, and I see no way around this. What are my alternatives?

Difficult to explain, but hopefully the attached files should make it clearer what I'm trying to do.

All ideas very welcome (and please
excuse the rather hideous timestamp approach - quick and dirty).
0 Kudos
Message 1 of 2
(2,512 Views)
XY-graphs do not have an in-built buffer the way charts do (there is no XY-chart) so you will have to hold the data in a buffer/buffers you make yourself. A circular buffer is a good option for this.

Let's say that when adding an input you dynamically create a circular buffer for it and you also make a functional global that administers the buffers (keeps a list of the signals available and which circular VI that holds it's data, in this case the timestamp X and the signal value Y). Now you can let the user see that list and select which ones to show on the XY graph. Every now and then you read that selection list. Wire the selection list to a for loop e.g. with autoindexing and inside it you call the circular buffers holding the data. You bundle the X and Y
(or do it inside the buffer) and wire it out of the for loop...now you have an array of XY plots ready to be wired into the XY graph...refresh at a rate high enough to give a "real time" impression for the user.
Message 2 of 2
(2,512 Views)