LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I label the peak in the waveform graph!

Hello, my question is a little vague. I try to narrate it clearly.
Thank you for your patience!
I work with Labview 7.1. At a word, My question is how to label the
peaks when using the while loop and the event structure with
the dobule click event!
1.Open the Why.VI and execute it.
2.Click in the 'Acquire signal', then you will find two modes to upload
the signals, press the 'Read' button and ignore the 'Sample',since 'Sample'
mode need the support from the hardware, while 'Read' mode just upload file
from disk,  select the 'Signal.txt'(inluded in the attachment), you will
find two waveform shown in waveform graph,just like 'Pic1.jpg'. Up to now,
there is no problem.
3.Press on the 'Analysis' button and enter a new interface. Amplify the plot
and selet the the a piece of waveform between about 3.02 and 3.06. Set the
x coordinate of the 'Cursor 0' as 3.03 and set the width as 0.01. Move the cursor
you will find two cursors(one vertical lines in yellow and another in blue).
Double click the graph and select 'valley', two x coordinate values corresponding
to the x coordinate of the two valleys are listed in the listbox. All above
mentioned is shown in 'Pic2.jpg'.
4.Let me explain my idea and my question now. What I have done is plot the waveform
when clicking in 'Analysis' interface;then, amplify the waveform, select
a certain area and move the cursors;at last, double click the graph, the waveform
between the two cursors are selected and the peaks are identified.But, what I need
next is to label the peaks in the graph as soon as I double click the graph,I
can not realize this idea because the waveform is out of the while event, the coordinates
of the peaks can not output until the while event is stopped. If I move the graph
into the while loop,the selected area can not be keeped because the while loop will
run continuously and will renovate the plot area to original area, but I want to keep
the selected area for got the peaks conveniently. In short, My question is about how
to label the peaks in the graph and keep the seleced area freely.
This problem has puzzled me for a long time. May anyone give me some advice.
Thank you for patience and really appreciate your help!
BTW:please let me know if the VI can not run well!
 
Download All
0 Kudos
Message 1 of 7
(5,796 Views)
Sorry, I try to compress the files in '.rar' ,but it is compatible with the web,I have to
upload them in reply file.Smiley Sad
Download All
0 Kudos
Message 2 of 7
(5,791 Views)
There are the two pictures
Download All
0 Kudos
Message 3 of 7
(5,789 Views)

Choose a cursor, assign the peak point coordinates as the cursor coordinates.

Label that cursor as 'Peak'

On Front panel, click on cursor legend and select 'show name'

Look at attached pic

Download All
Message 4 of 7
(5,780 Views)

Thank you for replying in time, it work well

But there still be a question: How can I identify the numbers of cursors by the Property node, What

I mean is may be there will me 4, 6 ,8 or more peaks, so, the same numbers of cursors should

be defined according to the numbers of peaks identified, but the number of peaks is not certain.How

can I programmely define the numbers of cursors used to label the peaks?  

0 Kudos
Message 5 of 7
(5,760 Views)

You could use property Node called 'Cursor List' for  programmatically defining a number of cursors

Note: read its Help in detail before using it!

Coz the cursor color, style, point style, its attributes such as show name, allow drag, will all be set from this property node itself.

If you use default color as '0'. will make cursor color 'black' and your cursor will be invisible on a default black background in the graph!

 

Message 6 of 7
(5,750 Views)
cool!
0 Kudos
Message 7 of 7
(5,727 Views)