LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Comparing array elements to a single value

Solved!
Go to solution

Hi there, 

I was wondering how you can compare each individual element in an array to a single value. The reasoning for this is that I am trying to identify minimum and maximum values in a square wave... the individual values of the square wave are written into a measurement file and then read by LabVIEW, and then presented in a 1D array. I would like make it so that I can compare these individual array elements to a threshold number (this would depend on what the high and low values of the square wave are) and this would then return either a 1 or a 0 if it was high or low. The VI is attached.

 

Thanks in advance

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

Simply wire a constant (or a single value from a control) to the other terminal of the compare function. The output will be an array of boolean.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 3
(2,297 Views)

Thank you very much, I did not realise it was that simple!

 

Regards,
Christopher

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