12-05-2010 08:30 PM
i'm using a ni 9219 to dectect volatage level. But when i try to run it with a peak detector program. It always come out a width error. can somebody tell me how to solve it?
12-06-2010 03:20 AM
Hi,
Could you give bit more specific details of your problem? Sounds like it's an issue with the peak detector VI you are using. Check the detailed help for that function and especially for the width parameter. You should also check that you are acquiring enough data to do the peak search.
- Matti
12-07-2010 05:33 AM
how do i ensure that there is enough data to do the peak search
12-07-2010 09:58 AM
I checked couple peak detector vi's and they seem to have some kind of internal memory so it basically doesn't matter how many samples you acquire. However, you should acquire at least 3 data points during your measurement to make the peak detection possible. This limit comes from the peak detection algorithm which is used for example in Waveform Peak Detection.vi and Peak Detector.vi. Note that the usage of the internal memory is controlled with the initialize and end of data booleans.
Could you tell us which VI do you use for peak detection? It would be easier to help you out.
-Matti
12-08-2010 01:46 AM
i'm using waveform peak detector
12-09-2010 08:54 AM
Ok, what values do you wire to inputs of the waveform peak detector? Especially width, initialize and end of data. What sample rate do you use in your measurement? If possible, could you attach your VI so we could take a better look at the problem you are having?
-Matti
12-09-2010 06:54 PM
the sample rate i use is 10k, the rate is 1k.
the input is from ni 9219.
i never change the witdh, initialize and end of data.
12-09-2010 10:00 PM
How can i make the data i want to start and end at the circles. There are many peaks within those peaks so may i know what can i do to take the global peak from the local peak.
12-10-2010 12:38 PM
Ok, there's couple of things that you should check in your code. First of all the maximum sample rate for NI 9219 is about 100Hz when using High speed mode. So you should modify your sampling rate accordingly. This might also be a limitation because you will be able to measure only low frequencies. Next thing to check is your width parameter. The width value should be atleast 3. But because your signal to noise ratio seems high, you should find a proper value so that you can better detect those peaks. You could try averaging if possible.
You should also create controls for you peaks/valleys and threshold inputs. You should use something else than zero as your threshold.
You could get a subset of your signal using the max peak location and determining the number of samples you want before and after that peak. You could use for example array subset function to do that.
You could check examples from Help->Find examples using keyword "peak".
-Matti
12-27-2010 11:15 PM
I have try adding a subset.
But i still get the error.