LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting only 1 peak value per cycle

Solved!
Go to solution

Hi,

I am studying hopping, and my subjects hop on a force plate at 2.2Hz for 30 seconds. I am attempting to output one peak ground reaction force for each hop in a bar chart, but my program is running so quickly that I get multiple peaks for each hop (see attached .png file). I have added conditionals to try to eliminate the extra peaks, but they only seem to be getting rid of the unnecessary peaks that occur before the actual peak. I've also tried to used a timed loop instead of a while loop, which sometimes removes the extra peaks, but not consistently. Does any one have other ideas about getting a single peak for each hop. Thanks.

Download All
0 Kudos
Message 1 of 4
(2,257 Views)

Lots of ways to do it.  My guess is you want the easist:

 

http://zone.ni.com/reference/en-XX/help/371361K-01/lvwave/waveform_peak_detection/

 

 

http://www.medicollector.com
0 Kudos
Message 2 of 4
(2,218 Views)

Hi,

Thank you for the advice. I tried using the waveform peak detection vi, but my program won't run when I include this vi. Regardless of what number I use for width, I get an error message that I need to use a width that satisfies 0 < width < samples. Maybe I'm just missing something here, but I've tried width=3, width = 1 and many other numbers that are between zero and the number of samples, so I'm having trouble figuring out what the actual problem is. 

0 Kudos
Message 3 of 4
(2,198 Views)
Solution
Accepted by topic author bpselgrade

Hi bp,

 

you probably tried to find pulses at the wire going into that "Peak" chart. You can't search for pulses on a scalar value...

 

When you tried that on your waveform (directly after DAQmxRead): how many samples do you read per DAQmx call? How many values are in your waveform?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 4
(2,193 Views)