LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

continuous XY graph

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.

0 Kudos
Message 1 of 15
(3,776 Views)

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

 

 

 

 

0 Kudos
Message 2 of 15
(3,751 Views)

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.

 

0 Kudos
Message 3 of 15
(3,734 Views)
Have you look at the chart with a longer history length of 2400? This will allow you to plot a point every 15 seconds for 10 seconds. If you enable scrolling, you can scroll all the way back to 0 and see the data. If you enable graph pallete, you can have the chart to fit all the data held within the history.
0 Kudos
Message 4 of 15
(3,730 Views)

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.

0 Kudos
Message 5 of 15
(3,728 Views)

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.

0 Kudos
Message 6 of 15
(3,710 Views)
You can certainly set the amount of data displayed by adjusting the min and max of the graph display but the memory will still continue to grow as you append new data to the old.
0 Kudos
Message 7 of 15
(3,702 Views)
The chart display assumes the data is coming at uniform time period. If this is true, all you have to do is keep adding the data into the chart like a chart recorder. You do not need to reload the dat, rather just add the elements for you periodic load, say every 15 seconds.
0 Kudos
Message 8 of 15
(3,689 Views)

hi, 

i am sending one vi. pls try that and reply

 

 

Regards,

Santhosh

Regards,
Santhosh M
0 Kudos
Message 9 of 15
(3,676 Views)

Santhosh

 

Could you resend the file in version 8.0? I do not have 8.5 yet.

 

Thanks. 

0 Kudos
Message 10 of 15
(3,656 Views)