09-09-2013 06:09 PM
Hi all,
I am trying to plot some data using the XY plot in labview (Please see attached vi). The problem is that there is a trigger signal which activates the large case structure. (my original code has hardware interfaced in this loop).
Some background: There are two devices, one of them is a thermometer and the other device measures capacitance. For every 5 degrees increase in temperature, the capacitance is measured and plotted against the temperature (X: temp and Y: cap).
I have attached a small vi which emulates the problem I'm facing.
I would like to get a plot with all previous data points also showing in the same graph.
Any help appreciated.
Thanks!
Sanjay.
09-09-2013 07:31 PM
09-09-2013 09:06 PM
Sanjay,
A normal XY Graph will not store the previous data points. (It is programers choice to do and plot).
But the Express XY graph (Build XY Graph.vi) will store the previous data points.
The problem you are facing is - Express XY graph is not storing the data.
It is because your caller VI (xy_plot_problem) is not running continuously without stoping.
The 'Express XY graph VI' uses 'First Call' function which has to be true only in first call. (Right chick the Express XY graph VI and click - Open Front Panel)
See the attachement.
Regards,
Yogesh Redemptor
09-10-2013 04:44 PM
Hi Yogesh,
Thank you so much for the solution but there was a problem with it...no new points were being plotted on the graph. You can see if you highlight execution.
Also, I tried using the express vi for building an XY graph but it plots only one point at a time. I also unchecked the "clear data on each call" option but it still does the same.
Please help.
Thanks in advance!
Sanjay.
09-10-2013 04:56 PM
Hi,
I'm using labview 2012. I tried using the express vi and unchecked the "clear data on each call" but still no use.
I'm thinking that it might be because of the loops in which it is encapsulated. Only when the trigger is activated is the XY graph used and at other times it is disabled.
I'm not an expert on labview, sorry if something in there doesn't sound right (I just need to interface these devices for my prof!).
Thanks!!!
Sanjay.
09-11-2013 11:52 AM
Hi sanjay_123,
So graphs are pushed a data set and don't normally keep memory. You can have the datapoints saved in the graph while running it the way you are doing if you have it in a while loop but the next time you run the program it will clear the graph. You might want to look into using some sort of chart to display the data, that will keep former data points in memory. Here is a document on the difference betweens charts and graphs:
http://digital.ni.com/public.nsf/allkb/95FEE9F5B252507E862562BA00007657