LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating conditions

I am trying to do the following: Finding on which iteration of a FOR loop that a true was found, and stopping the loop when it is found (a true is also not necessarily found), then using that as a condition.

The operation is a search for a value with tolerance in an array, and turning on a boolean if it is found, in a specific location (i.e. if a true is found on the first iteration, then the first boolean is on. If a true is found on the forth iteration, then the forth boolean is on etc...)
0 Kudos
Message 1 of 2
(2,577 Views)
Your basic problem is that you can't do that sort of conditional stop with a FOR loop. You have to use a WHILE loop. It has a node that tells the loop to continue for another iteration. If the node is in it's default state passing a boolean true to it keeps the loop going. Passing a FALSE to itr stops the loop.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 2
(2,577 Views)