Showing results for 
Search instead for 
Did you mean: 

show graph history

Dear all,
I want to display a set of two different temperatures in a graph where the first temperature comes from an array of 5 (TA 1-5) temperatures and the second one from another array of 5 temperatures (TA 6-10) where the user can select which two temperatures he wishes to display. I have done this using two different 5 radio buttons to index the two arrays and select which two temperatures will be visible. I have also changed the plot legend according to the radio button selection by indexing two arrays of temperature tags.
However, when I change the radio selection button the lines that appear on the graph are continuous of the current and the previous radio button selection. Is there a way to display the whole history of the temperature line selected each time you change the radio button selection? I am attaching the front panel and the block diagram of this vi...
Thanks for your help in advance Smiley Happy
0 Kudos
Message 1 of 8
Hi evdo
With only the selected channels going to the chart, the history doesn't know when you change the radio buttons. I would suggest sending all 10 channels to the chart and use the property nodes to make only the selected channels visible. You can use an event structure 'value changed' for the radio buttons to reset the visibility of each trace.
To avoid having all ten plots in the plot legend you can turn off the Plot Legend visibiliy and use two text and numeric indicators to still show selected tags and values.
0 Kudos
Message 2 of 8

@evdo wrote:
I want to display a set of two different temperatures in a graph ...


It looks like you are using an XY Graph when what you probably want is a Waveform Graph.

As it is, with your XY graph you're plotting one selected temperature vs. the other selected temperature.
Take a look at the context help or the Chart/Graph examples that ship with LabVIEW for more info on the different attributes of these things.

Fading out. " ... J. Arthur Rank on gong."
0 Kudos
Message 3 of 8

Addendum to my own completely wrong post:

Ian is of course correct and I really need to get new glasses.

Fading out. " ... J. Arthur Rank on gong."
0 Kudos
Message 4 of 8
Dear Ian,
thank you for your reply. I understand that your suggestion would be one way of doing this but I would like to keep it as it is. Is there a way of saving the data history of a graph and recalling it when needed? There is a "History data" option in the property node of the graph but I have no idea how to use it... Any tips???
0 Kudos
Message 5 of 8

To do this you will have to keep a history record of all 10 temperatures yourself and when the radio buttons change extract the two new temperatures from this store and place them into the chart history. You need to set up a 2D circular buffer (there are examples of this if you do a search) but a simple way of coding this is to use a second chart and turn off the visibility. The sample code (LV7.1) gives you some ideas. I had to change from a 'cluster' to a 'build arry' when collecting data for the chart otherwise the method doesn't work.

I hope this helps


Download All
0 Kudos
Message 6 of 8
Look at the XY chart example file. It includes an XY history buffer.
C:\Program Files\National Instruments\LabVIEW 7.0\examples\general\graphs\charts.llb\XY
0 Kudos
Message 7 of 8

Dear Ian,

This seems to be working perfectly, just the way I wanted it! Thanks a million 🙂 This forum is a life saver as always...


0 Kudos
Message 8 of 8