10-14-2009 04:26 AM - edited 10-14-2009 04:26 AM
Hello,
I have some problems with a chart.
I want to display some data and the time between two single data can vary. It is something between 50ms and 500 ms.
The problems I have:
1. The time is not shown correctly in the chart (allways 2:00:10 instead of the current time)
2. the data points in the chart have a distance of 1 s (x-scale). That is not correct.
I have tried several things but I thinkt I am on the wrong track.
Could you please help me?
Johannes
LabVIEW 7.1 (!)
Solved! Go to Solution.
10-14-2009 04:59 AM
If your data is evenly spaced in time (so a constant dt for the measurement, but it might vary from one measurement to the next), you can use the waveform data type.
If your data in unevenly spaced, you need to use a XY-graph, which gives you all flexibility...
Felix
10-14-2009 05:17 AM
Thank you Felix,
yes, the data is unevenly spaced.
I have just tried the XY-Graph, and it works concerning the space between the data.
But I stil have two problems:
1. showing the correct time
2. displaying the last 20 seconds
Have a look at my VI. I solved the second problem by using a shift register and deleting old data from the data array. If you execture the vi, you'll see that the graph looks stupid. How can I improve that?
10-14-2009 05:31 AM
Hi johannes,
in which way does the graph look stupid? At the moment you set it to display the last 21 values and does it like that. It also does uneven spacing of datapoints - all is like it should be...
If you want to have the last 20s of data then you have to keep track of the timestamp to delete older data!
(I prefer ArraySubset and BuildArray in favor of DeleteFromArray and InsertArray, for me it looks more intuitive )
10-14-2009 06:32 AM
I have modifierd the vi again.
Now it looks much better.
I have a data array and the last 10 seconds of the data are displayed.
The array size is maximum 150 and that is more than I need to display. If new data is inserted, the oldest gets deleted.
I wonder if this style is efficient?
The time is stil not displayed correctly in the graph. Why does it always show 2:00:00 ?
Johanens
LabVIEW 7.1
10-14-2009 06:43 AM
Ok, I use timestamps now. Ok likethis?
But now I don't know how to set the XScale Minimum an Masimum
10-14-2009 06:54 AM
Now I have it. I think.
Please have a look at this. Is it ok like this?
10-14-2009 07:02 AM
Sorry. The property node on the left was not neccessary...
10-14-2009 07:25 AM
what format must the data array have, if I add one more plot to the graph?
a cluster of timestamp & data & data?
or a cluster of arrays of timestamp & data?
10-14-2009 08:29 AM - edited 10-14-2009 08:30 AM
sorry wrong thread...