10-21-2008 12:02 AM
Following is what I am interested in doing:
1) I have a timed loop which get my a fresh set of data in ohm (array for doubles, size 20) every 15 seconds
2) I want to create a XY plot which has time on the X axis and ohms on the Y axis
3) I want to set the range on Y axis as 2 ohms to 5 ohms
4) I want to set the range on X axis as adjustable which starts at 0, and expands as more data gets collected. But I do not want the 0 to disappear (or scroll out of focus).
5) The maximum on the X axis will be 10 hours. And as the data is collected from 0 onwards upto 10 hours, X axis shrinks automatically to accommodate the data.
Since this is the first time I am attempting to use the plot functionality in Labview, I would appreciate if somebody can provide pointers so tackle the problem.
Thanks in advance.
10-21-2008 06:22 AM
Hi,
Maybe this wil help you
Use shift registers in your loop and conect the XY data with it.
Use a build array inside the loop and add the new XY data.
wire the XY data to the XY graph inside the loop.
use propety node of XY graph to adjust y-as settings
you proberbly want to to this outside the loop.
- y scale.range to set y scale range properties
- y scale.name.label.text to set the y-as text
x-as will scale automaticly
regards
Fred
10-21-2008 09:42 AM
Fred
My understanding could be wrong and please do correct me if I am:
If I wire the XY data to XY graph inside the timed loop, then the entire data (as it grows over 10 hours) is getting plotted every time the loop gets executed. That means, every 15 secs when I get the new data and add it to the array (through shift registers) , all the data gets plotted. Wouldn't that be time intensive? Ideally I would like to just plot the new data set of 20 items that is acquired in that particular loop.
Let me try it anyways and will report it.
Thanks.
10-21-2008 09:52 AM
10-21-2008 10:06 AM
If you only want to plot the new data, then that would contradict your earlier request to show data from time 0. You are correct in your assumption that the arrays will grow and grow over time and could very easily slow things down. There is a shipping example called XY Chart that uses a buffer to keep the arrays a maximum size - just like a chart. Of course, with this, older data will eventually get dropped.
10-21-2008 11:39 AM
My reply may have been confusing.
I would like the user to have option to scroll the data history all the way back to time=0. Like Joseph mentioned that I can scroll the data to loook at the history. But I do not want to plot the entire data set every time.
I will be collecting a total of 4 (freq of data collection per min) x 60 (mins per hour) x 10 (total hours) = 2400 data sets (with each set being 20 different items).
To not make plotting time/CPU intensive, I would like to be able to just add the new data set to the old XY plot and also have the option of scrolling the plot all the way to time=0 to see data over entire time history.
Thanks.
10-21-2008 11:57 AM
10-21-2008 01:19 PM
10-21-2008 11:24 PM
hi,
i am sending one vi. pls try that and reply
Regards,
Santhosh
10-22-2008 11:09 AM
Santhosh
Could you resend the file in version 8.0? I do not have 8.5 yet.
Thanks.