LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Filter values from string, i want to get only certain values!

Hi,

I have a serial values, from sensor rpm.
In this example it goes from 5089 rpm to 10452rpm.
I want to build a table with fixed values, ie: 5000, 5500, 6000,... i adjust the increments.
I want to search in the array numbers the value > or = than the number in table.
For example, if i have 5000 i want to search the next value > 5000, in this case 5089.
If the next value is 5500 i want to search value > or = than 5500, in this case 5505....
so, saved in the array this values which depent from the increments of parameters. I got the values to search, but i didnt get saved the correct values..
I attached the example with file numbers.

Any help?.
Thanks.
Download All
0 Kudos
Message 1 of 3
(2,998 Views)
Hi Fonsi,

The function that probably best fits your needs is Threshold 1D Array. The online help for this function says:

"Compares threshold y to the values in array of numbers or points starting at start index until it finds a pair of consecutive elements such that threshold y is greater than the value of the first element and less than or equal to the value of the second element."

The output value is a fractional number you just have to round to +infinity to get the array index you are looking for.
I am attaching an example.

Hope it helps.
César Verdejo
Training and Certification | National Instruments
0 Kudos
Message 2 of 3
(2,998 Views)
Hi Cesar, Thanks it worked!. I got.
0 Kudos
Message 3 of 3
(2,998 Views)