LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

repeat operation on condition

hi,im new here..

i have a question..how can i repeat an operation if the condition or comparison is not true...

if the condition is true, then procede to next operation.

thanks

0 Kudos
Message 1 of 7
(2,763 Views)
Use a while loop.
0 Kudos
Message 2 of 7
(2,757 Views)

the task is to randomly simulate a number greater than 80,if the number less than 80, it will continuously simulated a number. if the number is greater than 80,

it will stop the loop,add with another number and display the result.. the problem here is how can i obtain a true output inside the loop

0 Kudos
Message 3 of 7
(2,742 Views)
0 Kudos
Message 4 of 7
(2,736 Views)

Try using the "Greater Than" function found in the Comparison palette, instead of the Express VI you're using now.

0 Kudos
Message 5 of 7
(2,732 Views)

This VI just points out how dynamic data can be totally misused and misunderstood. The result of the comparison would be a true/false and it is correctly stopping the loop but the output is also being used to represent a number. Just plain wrong. If you had used the normal comparison function, as mentioned, all of this would have been clear.

0 Kudos
Message 6 of 7
(2,727 Views)
thank you all..i manage to solve it 😃
0 Kudos
Message 7 of 7
(2,718 Views)