LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

display an array of waveform on a waveform chart

Hello

I am trying to display an array of waveform data on an waveform chart.

 

The array has two elements: first one is the measurement of speed containing 100 points, and second one is the measurement of torque containing 100 points. The data is passed from a DAQ loop, with the speed of 1kHz. 

 

When I start displaying, the data is only showing in the very near right side. I can rarely see it (see the attachment).  I tried to change the initial settings of the chart, like check "synchronous display", change the scale of x axis and so on, but it didn't really help. 

 

What I also did is:

- use a waveform graph to display, and it succeeded. But I would like to have the record of data history.

- the data from DAQ is passed by a shared variable with a RT FIFO. The setting of the RT FIFO is also in the attachment. If I change it to 1 Point per Waveform instead of 100, the problem is also gone.  

 

I assume that I still miss the correct configuration of the waveform chart. Does anyone have some clues on it?

 

I am using LV2009

 

Thanks a lot in advance!

 

Best regards

zzha

Download All
0 Kudos
Message 1 of 4
(2,320 Views)

Hi 

Could you post your VI please so we can have a look at your code

Frederic

0 Kudos
Message 2 of 4
(2,308 Views)

Hi
"torque-speed measurement.vi" is the DAQ loop. Collected data are passed by a shared variable with a RT FIFO to "display.vi". The FIFO setting is uploaded in previous post. The DAQ uses 1kHz loop.

 

I think the RT FIFO settings are quite important to this problem. If I set it to 1 Point per Waveform instead of 100, the problem is gone. 

 

Please disregard the error when loading it.

Download All
0 Kudos
Message 3 of 4
(2,289 Views)

You can present the data to a chart one (time) point at a time.  Charts have a fixed size (default is 1024 points), so if you have a chart that displays 1000 points and you feed it points at 1 KHz, then it can show 1 second of data before the data scrolls off the right-hand edge.  In my own application, I want to see 10-50 seconds of data, so rather than displaying every point, I display every 10th (which gives me 10 seconds of data) or every 50th (for 50 seconds).  Note that you probably don't need an RT FIFO, but can use an ordinary queue to pass the data (the FIFO helps you preserve "timeliness", but all you care about is not missing data -- you don't really care if the points aren't plotted at exactly 1 msec intervals, but vary somewhat (you can even have the plot "pause" for a few milliseconds and probably not notice it).

0 Kudos
Message 4 of 4
(2,269 Views)