LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Determining Times of Peaks

Solved!
Go to solution

In the VI attached (Labview 8.0), I am trying to obtain the times of the max amplitude peak from each channel. However, after the while loop is stopped, I am getting the wrong times for the peaks: The first time output (Time of Wrist Uncock) appears to be displaying the time that the program is started, and the second time output (Time of Ball Impact) displays the time the stop button is pressed. The times of the max amplitude peak from each channel are not displayed. This is probably due to an error in my time calculation, but I cannot figure out what it is.

 

Any help is greatly appreciated.

 

Thanks!

Johnny

0 Kudos
Message 1 of 6
(3,239 Views)

Johnny,

 

What I think you want is to take the Peak Locations output of your peak detector and multiply it by the dt, then add to.  You can connect the peak locations array directly to a multiply object.  If you need to use a Max & Min function, use the MaxIndex output with an index array function to get at individual array elements. 

-Matt Bradley

************ kudos always appreciated, but only when deserved **************************




0 Kudos
Message 2 of 6
(3,219 Views)

Thanks Matt, but don't I need to incorporate the amplitudes output of the peak detectorsomewhere , because I am trying to find the time location of the greatest amplitude?

 

Johnny

0 Kudos
Message 3 of 6
(3,208 Views)

Johnny

 

One potential Source of problem I see is when you do the array search you are only using the array subset from the peak search. So the index you use to mulipy dt with will not reflect the full data set. I think you should also be able to do more of the processing outside of the loop, since it seems like you just do some quick data capturte then post process the data.

 

This would be a great opportunity to use the Dev Zone Community, you can post you code here then other users can make edits and suggestions you will be able to track all of the changes and keep al, of the revisions.

 

hunter

0 Kudos
Message 4 of 6
(3,185 Views)
Solution
Accepted by topic author JohnnyF14

Check out this examplefrom the Community

 

 

 

Message 5 of 6
(3,166 Views)
Thanks Hunter! That works perfectly!
0 Kudos
Message 6 of 6
(3,160 Views)