LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI 9219

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?

0 Kudos
Message 1 of 10
(3,424 Views)

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

 

0 Kudos
Message 2 of 10
(3,404 Views)

how do i ensure that there is enough data to do the peak search

0 Kudos
Message 3 of 10
(3,379 Views)

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

0 Kudos
Message 4 of 10
(3,368 Views)

i'm using waveform peak detector

0 Kudos
Message 5 of 10
(3,347 Views)

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

0 Kudos
Message 6 of 10
(3,319 Views)

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.

0 Kudos
Message 7 of 10
(3,307 Views)

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.

Download All
0 Kudos
Message 8 of 10
(3,300 Views)

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

0 Kudos
Message 9 of 10
(3,273 Views)

I have try adding a subset.

But i still get the error.

0 Kudos
Message 10 of 10
(3,158 Views)