LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Collecting multiple Max Min points from a non uniform sinousodal signal.


@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?

0 Kudos
Message 21 of 27
(794 Views)

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  

0 Kudos
Message 22 of 27
(773 Views)

Sorry for previous VI, please consider this one

0 Kudos
Message 23 of 27
(770 Views)

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!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Download All
0 Kudos
Message 24 of 27
(764 Views)

I'd go for something like this:

 

PtByPt Min Max.png

 

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.

0 Kudos
Message 25 of 27
(748 Views)

Can you please reupload the VI for 2017 version ?

0 Kudos
Message 26 of 27
(741 Views)