LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Taking mimimum value from array data

Solved!
Go to solution

I'm storing test data in an array, with the hope that I can output the minimum value from this data. So far I have been using the max/min array but cannot get it working how I'd like. The test is running continuously in a whle loop. I am getting minimum values from the array, however I would like to chnage the number of samples the array holds, before it outputs a minimum. The other option is that I run the test for a set period (e.g. 3 seconds) and the array stores data for this time then outputs 1 minimum value for the total period.

 

Attached is my current setup VI.

 

Much Appreciated

 

Chris

0 Kudos
Message 1 of 3
(2,607 Views)
Solution
Accepted by topic author chrisharris

The size of the array in your VI is determined by the number of samples you are collecting in your DAQ assistant, which right now is 100 samples.  Never any more, never any less.

 

How many samples do you want to have before determining the minimum?

 

Perhaps what you really want to do is to build the array in the while loop and store it in a shift register, and when the loop has iterated enough times, then you take the minimum of the built array.

Message 2 of 3
(2,570 Views)

Hi

 

Thanks for your help, I spoke with one of my university advisors and he recommended the same as you and this seems to work. We have upped the number of samples to 1000 and all tests are working well. The other method looks good as well might give it a try as a possible alternative for my own knowledge.

 

Chris

0 Kudos
Message 3 of 3
(2,558 Views)