05-20-2024 05:18 AM
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?
Solved! Go to Solution.
05-20-2024 06:07 AM
R-click the Less than and select Compare aggregates and you have a better starting point.
05-20-2024 09:52 AM - edited 05-20-2024 11:41 AM
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.
05-20-2024 11:52 AM
See if this can give you some ideas....
Connect whatever is appropriate in your scenario to the case structure.
05-22-2024 05:32 AM
How about if I have two monitors with different resolution?
05-22-2024 09:00 AM - edited 05-22-2024 09:02 AM
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.)