LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Peak hold function

Solved!
Go to solution

Hello,

 

I would like to compare the values of a signal (1-D array) with each other and always display the maximum value then. But only if it is desired.
It should be in principle, a peak hold function, which I always displays the maximum value.
In the "FFT Power Spectrum.vi" there is such a "peak hold function". However, I do not know how I can integrate it without the "FFT Power Spectrum.vi" in my vi.
Maybe someone can help me here.

An image of the vi said maybe more (
the picture shows a first attempt, which unfortunately does not work as expected).

Thank you and best regards

 

Alesis

0 Kudos
Message 1 of 10
(7,562 Views)

See the attached vi.

Your approach was very close but since you dont initialize the SR you will see peaks from previous executions of the application.

 

The attached sub vi can be make reentrant if you need it in multiple places where the signals have seperate peaks.  It also will reinintialize on first call or can be reset at any point of execution with a boolean input.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 10
(7,544 Views)

Forgot the attachment. 

Note since it uses the Max function it will keep the first peak (you could insert a reverse array or replace this logic to find the last peak)

 

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 3 of 10
(7,542 Views)

Thank you for the example.

However, I would, if the Case Structure to "true" goes, let me always see the "maximal" graphs.

There is a fine example:
Simple Spectrum Analyzer (sim). Vi

There you can adjust the "averaging mode" mode "peak hold".
I'd prefer it exactly that way. But without the FFT Power Spectrum.vi!

And unfortunately, I do not understand what going on in the FFT Power Spectrum.vi if you click into it
(especially in the area of the "peak hold" function).This is probably the problem...

 

Hope you can help me with my problem again.

 

Thanks, Alesis

Message Edited by Alesis on 11-18-2009 07:56 AM
0 Kudos
Message 4 of 10
(7,533 Views)

Has no one an idea how to make a "peak hold" function without this "FFT Power Spectrum.vi "?

 

(Or maybe someone has another suggestion how to display only the maximum on the graph?)

 

The best way to see what I mean is in the example where I have mentioned above!--> Simple Spectrum Analyzer (sim).vi

(It is not easy to describe the problem exactly)

 

However, I need it without the 'FFT Power Spectrum.vi.

 

If the "peak hold" function is selected in this example, the signal travels slowly upward in the graph -> it will demonstrate that only the maximum value is displayed!
And that's exactly what I need!
I hope someone knows what I mean and can still help me, because unfortunately the example of "falkpl" did not work as i need it...


In my picture above you can see that I have tried something.

 

But unfortunately it does not work like I need it...

 

Best regards Alesis

0 Kudos
Message 5 of 10
(7,512 Views)
Solution
Accepted by topic author Alesis

All you need is a little help from the Max & Min Function. (At least for how I remember Max Hold)

 

PeakHold.png

Message 6 of 10
(7,502 Views)

That looks really good!

I think that's exactly what I need.

Tomorrow I will try to incorporate it into my vi.

I live in Germany and there is a bit later. (so until tomorrow)

 

And this may explain my somewhat "worse" English  Smiley Tongue

 

I will then report back tomorrow if it worked.
 
Thank you for your help!!!
 
Alesis 
0 Kudos
Message 7 of 10
(7,487 Views)

Hello Darin.K
with a little delay, I would like to express my thanks to you!

The "peak hold" function works fine now.


It was in principle exactly what I needed. Although I had to rebuild a few things so that it works for me but the main thing is it works now!

 

Thanks again and best regards!!!

 

Alesis

0 Kudos
Message 8 of 10
(7,434 Views)

Alesis wrote:

Hello Darin.K
with a little delay, I would like to express my thanks to you!


Then please mark Darin's reply as the solution to your problem rather than your own thank you message.  You can unmark your message as the solution by going to the Options menu to the upper right hand corner of your reply.

0 Kudos
Message 9 of 10
(7,397 Views)

Sorry, I thought I can mark the solution anywhere.
But I have corrected the error and sets the mark for Darin.

 

Alesis

0 Kudos
Message 10 of 10
(7,383 Views)