LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading boolean array one by one

Solved!
Go to solution

tan0709_0-1716200048010.png I want to run a piece of code if monitor resolution is less than 1920 X 1080. I was trying with variant to convert the array of Boolean values. Actually, I don't know what I did there, could you please help?

0 Kudos
Message 1 of 6
(229 Views)

R-click the Less than and select Compare aggregates and you have a better starting point.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 6
(216 Views)

You are converting to a boolean, not an array of booleans. You also have a glaring race condition such that the value property is read well before the terminal receives new data. The use of variants and "array element value" properties shows a complete lack of understanding.

 

Please attach your VI so we can have a look.

 

You are comparing two values, so there are four different outcomes: Both are smaller, H is smaller, V is smaller, none are smaller.

0 Kudos
Message 3 of 6
(181 Views)
Solution
Accepted by topic author tan0709

See if this can give you some ideas....

 

altenbach_0-1716223856895.png

 

Connect whatever is appropriate in your scenario to the case structure.

 

Message 4 of 6
(163 Views)

How about if I have two monitors with different resolution?

 

0 Kudos
Message 5 of 6
(106 Views)

You can loop over the pink array (autoindexing on a FOR loop!) and process all in the same way. Currently I index out the first element (monitor), assuming there is only one.

 

How you deal with the result is up to you, because there are many possible results (first is larger, both are larger, etc, etc.)

0 Kudos
Message 6 of 6
(92 Views)