I am trying to write a routine for peak/valley detection. What I want to do is be able to scan data for a period of time (say 5 or 10 seconds) and have my routine spit out the max and min values detected during that time, regardless of level. I don't want to put in a hard threshold value as I can't say for certain what my values will be, so if there must be a threshold it has to somehow float with the signal.
I want to manipulate the data as it updates (at the 5 or 10 second interval), display it and log it to a file.
I also want to be able to have a running display of the raw data that will be updated at some fractional second interval.
Can anybody recommend which peak detector functions and/or VIs would be best for this, or better yet which example program might be the best for a starting point?