LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plotting elements from an array in waveform chart

Hi all,


         I am trying to plot a real time data by extracting single element from an array.

Problem is that, at some frequencies waveform chart plot perfect while at other frequencies it plots like a undersampled signals.

 

Any suggestions?

Download All
0 Kudos
Message 1 of 8
(3,035 Views)

It is called aliasing. You are feeding data to the chart at the rate of 2 samples per second. For any frequency of signal at or above 1 Hz the representation on the chart is erroneous. You are undersampling as you suspect.

 

Lynn

0 Kudos
Message 2 of 8
(3,030 Views)

But its showing the perfect signal at 80 Hz.... which is higher frequency 😕

0 Kudos
Message 3 of 8
(3,024 Views)

Sometimes you get lucky. If the combination of the frequency of the sine wave and the instantaneous phase of the sample which is selected by the array manipulations form a sinusoidal pattern, then it will look OK on the chart.

 

Note that the time scales on the graph and chart do not match. You get 4 cycles on the graph in 1000 time units and about 5 cycles in 50 time units on the chart. If the signals were not undersampled, the time scales would be the same.

 

Lynn

0 Kudos
Message 4 of 8
(3,016 Views)

ohkay,, thanks I got it now, so it means taking more than one element from an array will work for this problem...?

0 Kudos
Message 5 of 8
(3,004 Views)

I am not sure exactly what problem you are trying to solve?  Charts tend to be usful for situations where the data comes in one point at a time and at relatively low rates. If you are acquiring larger chunks of data at higher rates, it is usually better to plot the entire chunk on a graph.

 

Lynn

0 Kudos
Message 6 of 8
(3,001 Views)

I will be acquiring data from biosemi with sampling rate of 512 Hz, and need to plot it realtime. Actually I'm trying this with waveform chart because I think it gives more precise time information comparing to waveform graph..

0 Kudos
Message 7 of 8
(2,997 Views)

The timing information comes from the data acquisition process, not the display. You should be able to get equally good display of timing information on a chart or a graph.

 

How many samples do you read at a time? How do you define "realtime"? Anything plotted on a graph or chart for the use of a human operator does not need to be updated more than about 10 times per second because the eye/mind system works at about that time scale. For humans a real time grahical update rate of 2 to 10 Hz is adequate. Then you will have 256 to ~51 new samples at each update.

 

Another issue is that both your graph and your plot have plot areas which are less than 200 pixels wide. If you supply more than [plot width] pixels to a graph or chart, LabVIEW will reduce the data to determine which pixels to plot. So your graph with 1000 X-axis values has that reduced to the 184 pixels across the width of the graph. So, regardless of the precision of the data, the "precision" of the display is limited to the number of pixels.

 

Lynn

0 Kudos
Message 8 of 8
(2,982 Views)