From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

1D Array Threshold Value Search

Solved!
Go to solution

I have a 1D array of data. I would like to search the array for the first time it exceeds a threshold value.

 

I have tried using the "Threshold 1D Array" VI but not getting the results. It looks like that VI searches for 2 consecutive values, which occurs much later in my array.

How can I search for the first occurance of a singl point that excedds a threshold I set?

0 Kudos
Message 1 of 4
(2,873 Views)

You could use "Greater?" to see when your array exceeds the threshold. Then use "Search 1D Array" to get the index of the first value which crosses the threshold, like this:

 

Threshold

0 Kudos
Message 2 of 4
(2,859 Views)

I am following you for th most part, but how / where do I connect my array data?

Thanks

0 Kudos
Message 3 of 4
(2,851 Views)
Solution
Accepted by topic author CastleWorks

You would replace the for loop with your data, so instead of the for loop you would have something like:

 

threshold.png

0 Kudos
Message 4 of 4
(2,848 Views)