11-03-2013 05:45 PM
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.
Solved! Go to Solution.
11-04-2013 02:03 PM
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/
11-05-2013 09:03 AM
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.
11-05-2013 09:11 AM
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?