LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying a section of a graph.

I am getting data from a device on a USB bus and building time and data
arrays to
display on a XY graph. Somewhere in this data is a true maximum value. I am
simply
using the array max/min vi to find the max value and it's index. I want to
display on
a separate display (chart or graph) the section of data centered on the peak
starting
a selected number of milliseconds before the peak and the same number after.
While I am now using LabView 7.1, most of my work has been with LabView 5.1.

I tried selecting a subset of the data and time arrays with the zero indices
equal to the index
number of the peak minus X with the lengths of the subsets equal to 2X. The
results are really
not too good. I know I am missing something basic. Maybe with mental inertia
thinking in LV5.1 I am overlooking what LV 7.1 can do for me.

WEL


0 Kudos
Message 1 of 4
(2,556 Views)
Simplest would be to just send ALL the data to a second graph where you set the axis max and min to the desired part of the data. You would do this with property nodes (called attribute nodes in LabVIEW 5.1).
 
How large are the data sets? Are the x-values spaced equally?
0 Kudos
Message 2 of 4
(2,551 Views)

"altenbach" <x@no.email> wrote in message
news:1151376006159-383804@exchange.ni.com...
> Simplest would be to just send ALL the data to a second graph where you
> set the axis max and min to the desired part of the data. You would do
> this with property nodes (called attribute nodes in LabVIEW 5.1).
> &nbsp;
> How large are the data sets? Are the x-values spaced equally?


The problem is that the data is coming into the program constantly; The
primary graph is configured to run like a chart strip recorder. I just want
to grab and hold the area around the peak while the main graph keeps
displaying the data as it comes in. If the data is coming in at the rate of
one point per 10 msec then the peak may be around 150 msec, but until it is
occurs I don't know where
the peak actually would be. The secondary graph would display the data from
100 to 200 msec
(peak+/- 50 msec) and hold it.

I have 10 yrs+ working with LabView total and about three months with LV7.1.
There are
just some things I never had to do in the past.

WEL


0 Kudos
Message 3 of 4
(2,549 Views)
If the data comes in at a constant rate, you should not use an xy graph, but a plain chart or waveform graph, setting the x0 and dx accordingly.
 
For the peak display, you just need to shuffle the data into an array buffer contained in a shift register, then stop updating it once the peak is in the center of it. The attached program sketch shows one possibiliy (LabVIEW 7.1). It should not be hard to adapt it to 5.1.
 
(Of course you would need to substitute a suitable peak detection algorithm). Modify as needed.
0 Kudos
Message 4 of 4
(2,540 Views)