08-15-2014 04:53 PM
Title says what I want. Resisting complaining. I want an input (Y-axis) with the time that data point was taken on the x-axis.
I have tried every solution posted online and have come up with nothing. Either the time stamp increases at the incorrect rate, or the data/time doesn't post until after I stop the program. I have posted my program below but it is a nightmare trying every suggestion and graph labview has to offer. I have tried xy graph, xy graph xpress, waveform charts and graphs. I have tried creating property nodes on waveforms, and making simple XY graphs.
I just want a value of double associated with a timestamp, and plotted in real time. Thank you.
All graph attempts are on the right side of the block diagram.
08-15-2014 05:26 PM
I may have figured out how to add the time data, but the charts and graphs ALWAYS autoscale from 1998 to 2028.
I have get date/time => dbl => bundle with data. That is then converted to 1D array. I can't figure this out. Thank you.
08-15-2014 05:31 PM
08-15-2014 05:35 PM
This is the best capture I could get. The problem is that when I "Get time stamp" the graphs always want to set that to t0. Therefore the x-axis always resets itself every time the while loop repeats. Thank you.
08-15-2014 06:24 PM
08-15-2014 07:09 PM
It seems that there is HIGH demand for an XY graph to behave like an XY chart, but so far labview has failed to provide since ~2007 the latest I have found. I had to use a giant shift register to save my values, build them into an array, and then REPLOT every single iteration. This seems incredibly inefficient, but until they make an XY chart I guess this will have to do. Posted.
08-15-2014 07:13 PM
08-15-2014 09:00 PM - edited 08-15-2014 09:01 PM
@stevenette wrote:
I had to use a giant shift register to save my values, build them into an array, and then REPLOT every single iteration. This seems incredibly inefficient, but until they make an XY chart I guess this will have to do.
Well whether you maintain the shift-register, or LV does behind the scenes, that's the way charts work -- at least with the default update method. And I suppose that a case could be made for the argument that is you are needing to plot so much data that performance is an issue, you are perhaps plotting too much data. Think about it for a minute, if your graph is say 500 pixels wide, you are only going to see 500 distinct X values -- no matter how many you send to it. Better to decimate the data before you plot it -- which also leaves the door open for some really neat zoom effects.
But however you handle it, one thing that can cause performance issues is how you are managing the arrays.
Mike...