LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to plot a chart with the time interval not fixed?

Solved!
Go to solution

Hi,

 

I know this question is a little stupid..., but I'd still like to know how to realize it...

If the signal is generated randomly by time, how to plot it in the chart since its interval must be fixed?

like the following image

 

20150513002.png

 

I think XY Graph might realize it, but it is not what I want since the signal is generated continously for a long time.

I hope the data will be updated as the chart mode, is it possible?

 

0 Kudos
Message 1 of 7
(3,881 Views)
I don't understand your objection to an xy graph. That is exactly what it is for and you can display as much data on it as you want (within the limitations of system memory).
0 Kudos
Message 2 of 7
(3,877 Views)

Hi, Dennis_Knutson,

 

I just don't hope there're too many data points on the graph.

If it generated 10000 data points after a long time, the graph will show all the data by enabling the autoscale property of the X-scale. It's somewhat too dazzling...so that I'd like to play it with something like a strip chart or scope chart that can update continously. Is it possible to make the XY graph become the similiar way as the chart?

0 Kudos
Message 3 of 7
(3,871 Views)
Solution
Accepted by topic author William1225

Use a fixed size queue and do a lossy enqueue when new data comes in. It essentially becomes a buffer of data of length defined by your queue size. To display the data, use 'Get Queue Status' with 'Return Elements' = True.

 

(Or have an array of fixed size and have a circular index of elements - but I think the queue solution is neater)


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 4 of 7
(3,867 Views)
You can update an xy graph continuously, one point at a time. The Express XY Graph does that. You can also limit the number of points, just like a chart. One way is with a lossy queue. Look for fifo examples.
Message 5 of 7
(3,865 Views)

Hi, Sam_Sharp & Dennis_Knutson,

 

Very appreciated to your helps, and then I know how to realize it:)

0 Kudos
Message 6 of 7
(3,849 Views)

You could write waveforms to your chart.  You can have a waveform with only 1 data point.  But the T0 is the important part here since the chart will use that to know the X value to use.  And since you are using a chart, the data is just appended and only the chart size data points will be kept.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 7
(3,844 Views)