I have 4 pressure sensors that are hooked up to an NI USB 6000 for data logging. By exerting different level of pressure, I can collect analog input over time and show the results in waveform Graph1. The measurements are written in a file in continuous mode and read and shown in Graph 2 after everything is acquired. Please see my attached VI.
I am interested to find each wave's maximum value. Is it possible to use the "Array Max & Min" to find this value for each sensor? Please let me know how I can do that.
Your help would be greatly appreciated.
Solved! Go to Solution.
The Array Min & Max will return the highest value of your array so if that is good enough for your application it'll work fine.
Your data is relatively noisy and some of the tops are flat so you may want to try the Peak Detector VI that offers you more advanced fitting options. That VI will not just return the peak sample value but estimates the positions and locations of your peaks.
From the Help:
This Peak Detector VI is based on an algorithm that fits a quadratic polynomial to sequential groups of data points. The number of data points used in the fit is specified by width.
Thank you so much for your suggestion. Peak Detector VI is exactly what I need.
Working on it, I don't understand why I can't get any results for #found, Locations and Amplitudes indicators.
Would greatly appreciate your help!
Sorry I am still unable to get the expected results from the peak detector.
Please see the attached VI.
Thanks very much
Please either attach the result TDMS file or save the graph data as default, save your VI and repost it.
The main issue was that the 'waveform' you were analyzing only had three 'samples'.
You have to configure the Convert from Dynamic Data as explained on the diagram of the attached VI, otherwise you only get the first sample of your 3 waveforms (I know it's not obvious 🙂 )
Also the width value has to be much bigger in order to reject local maximum caused by noise. As you can see on the results the interpretation of the maximum for the first peak is debatable and chosing the array max value may as well be correct.
Sorry for bothering you again. I have one more question. Trying to add 3 more waveforms to the graph, the peak detector only detects the peaks of the first wave. I want it to find the peaks of all 4 waveforms. Please see the attached VI and let me know what the problem is.
Also regarding the curser in Waveform Graph 2, how can have it a horizental line similar to the attached "Peak Detection and Display" VI.
Thank you very much for your help. I really appreciate it.