04-15-2009 03:49 PM
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
Solved! Go to Solution.
04-15-2009 08:02 PM
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.
04-15-2009 09:42 PM
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
04-16-2009 02:06 PM
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
04-17-2009 08:46 AM
04-17-2009 09:42 AM