10-15-2020 10:33 AM
@Pukhtun_Yum wrote:
Can you guide me about what to be done so that the VI just takes only the MAX and MIN points and not any other ?
Not by looking at a picture. Can you attach real data?
10-19-2020 03:04 AM
What I am doing is taking 1000 Max and Min points from Daq samples. In the graph it can be seen that points other than the max min are also taken by the VI. What I am intending to achieve is to take just the maximum and minimum value and ignore every other value which the VI consider as zero crossing. Also I want to take equal number of Maximum and Minimum points so that i get an accurate value of peak to peak and standard deviation
10-19-2020 03:20 AM
Sorry for previous VI, please consider this one
10-19-2020 03:37 AM - edited 10-19-2020 03:38 AM
Hi Yum,
@Pukhtun_Yum wrote:
In the graph it can be seen that points other than the max min are also taken by the VI. What I am intending to achieve is to take just the maximum and minimum value and ignore every other value which the VI consider as zero crossing.


You talk about data points like on index ~795380?
Then you need to apply either some (noise) filtering on your input data - or you need to refine the conditions of your min/max-search algorithm!
10-19-2020 07:28 AM
I'd go for something like this:
This would be easy to adapt to a PtByPt VI, although I'd put the state data in a class's private data.
It should be easy to adapt to return 'global' indices, or indices counted backwards from the current sample, or time.
You won't know if a current sample is a minimum or a maximum, until you passed some criterium. I've used a threshold of 0.01 here. That's the alternative of a filter.
Time (samples) could also be used as a criterium. That would probably turn out quite simple as well. Simply add the last max and reset min if max didn't change n samples, and the last min and reset max if it didn't change n samples. Or something like that...
I now keep min and max, and 'arm' the min when a max is encountered, and vice versa. This could probably be replaced by a going up\going down state. That would reduce the duplicate code.
10-19-2020 07:56 AM
Can you please reupload the VI for 2017 version ?
10-19-2020 09:41 AM
Here it is in LV13.