Re: Help me with this Peak detector.
The Peak Detector function in labview counts the number of peaks of whatever signal you are supplying to it, which means if your signal is continuous (collected via a daq), the Peak Detector will always start from zero and only give you the number of peaks in the chunk of signal that it receives each time from the daq (the size of this chunk depends of your sampling rate and your buffer size). The Peak Detector does reset its count every time it is called by your code.
However, you can retain the previous count by placing your daqmx and your Peak Detector function inside a while loop. This way you can pass the "# found" through each iteration with a shift register. This will allow you to add the new "# found" to the previous one. Because you have a while loop, you do not need to press Run Continiously. The program will run continously if you click Run until you press the Stop button for the while loop.
You can read a little more about shift registers here: http://learnlabview.blogspot.com/2008/06/programming-labview-shift-register.html
Also attached is your code modified.
I hope this helps.