03-02-2010 08:20 AM
Hi Folks -
I have tried two different spectra for the LabVIEW Waveform Peak Detector (LabVIEW 8.5). One works fine, the other does not, and I am trying to figure out why. VI and screenshot attached. I hardcoded the arrays so you can just run the VI. Any thoughts?
Thanks,
Don
Solved! Go to Solution.
03-02-2010 08:50 AM
Hi Don,
Looks to me like the values are simply too low. But it's odd that there is no error generated.
I don't know if this solution will work for you or not. But I tried something on a whim and it seems to work.
The only thing I can guess is that the numbers you had were simply too small for the algorithm to work.
03-02-2010 08:52 AM
03-02-2010 09:36 AM
Hi Coq - I don't know if you opened my VI but the wiring is correct. I ran your VI in LabVIEW 9.02f and it runs fine. I then saved it to LabVIEW 8.5 and run into the same problem. National Instruments must have corrected something in the Peak Detector algorithms between then and now. It would be nice if someone would verify this. I have a feeling that they used increased precision for the variables in the CIN to cure the problem that Pallen points out is probably because the numbers are too small with the precision used in LabVIEW 8.5. By the way, the wavelet peak detection routine in the Advanced Signal Processing Toolkit works fine.
Don
03-02-2010 10:16 AM
03-02-2010 11:18 AM - edited 03-02-2010 11:18 AM
I guess this is quite similar to Pallen's solution so we need to give him credit for the solution.
Thanks for taking a look.
Sincerely,
Don
03-02-2010 11:45 AM
03-03-2010 07:19 AM - edited 03-03-2010 07:22 AM
For both suggested solutions, these are not full proof methods TO AUTOMATE the operation. It will depend on the actual data. Which is why I expect NI went in and changed the precision for this function in LabVIEW 2009 to correct this for all cases....
Don
04-25-2010 09:05 PM
As an aside: speaking of peak detectors, I'd like to mention a "free" one you can use by way of the "free" array you get when you use a chart's History Data. You can use the History Data property and get the Max value in the array and hold it until the number gets larger, then of course replace it with that number. Free peak detector! Yes, it is limited by the Chart History Length, but you can deal with that by storing values. I'm not saying it would work for this application, I'm not even saying it's a good idea, heck I don't call me Broken Arrow for nothing, I'm just saying.