LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to convert 1d boolean array to exit while loop?

Solved!
Go to solution

 

I initially had one >= block to exit this while loop and it worked fine. I wanted to add a second condition to exit the while loop, again using a >= block, so i run both into an OR block and I get a broken wire. I dont understand why one works but the other doesnt.

 

 

The bottom doesnt work with or without the OR block.

 

Untitled.jpg

0 Kudos
Message 1 of 4
(2,681 Views)
Solution
Accepted by topic author newEngineer09

If your goal is to stop based on the OR of the two condition, greater then 720 "OR" any value that is greater than or equal to 0.5 you have to "OR" the array coming out of the greater than or equal 0.5.

 

bool.png

Message 2 of 4
(2,669 Views)

You have an array of samples that you are comparing.  Therefore, you have an array of booleans.  You need a scaler boolean to go to the conditional terminal.

 

So this is where we question when you want to stop the loop.  When any of the samples is greater than 0.5?  Use OR Array Elements.  When all of the samples are greater than 0.5?  Use AND Array Elements.  Both of those functions are in the Comparison palette.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 4
(2,668 Views)

thank you both for your feedback. Im still getting used to labview.

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