03-10-2020 02:00 PM
It's works, but doesn't looping. why? Sorry for my bad english.
03-10-2020 02:09 PM - edited 03-10-2020 02:10 PM
I guess the complicated boolean logic controlling the loop's Continue if True terminal is not evaluating what you want.
And why do you have 2 stop buttons? That complicates things!
Do you have any errors on the error wire?
The loop will continue only if Condition 1 and Condition 2 are true.
Condition 1 Stop pressed OR Error is True.
Condition 2. Stop2 pressed OR Error is True.
I'd try making it a Stop when True Loop and changing the last AND before the Condition into an OR.
Really, you only need 1 Stop button. OR it with the last segment of the error wire inside the loop. Then wire that to the Stop when True terminal of the While Loop.
03-10-2020 03:40 PM - edited 03-10-2020 03:41 PM
In additions to what has been said, your loop can only continue to the next iteration both errors occurred or if BOTH stop buttons are TRUE at the same time (or a mix). Assuming there is no error, both buttons need to be true, and since they are most likely latch action, you need to press them both during the same iterations, which might be difficult, depending on the loop rate.
(Obviously, you can now see why a picture is quite useless to troubleshoot and we prefer to look at the actual VI. A picture cannot tell us the mechanical action settings or the default loop time, for example. Next time, attach the VI instead)
Typically we want to stop if a stop button is pressed or an error occurs, so change the last AND to OR and change the loop condition to "stop if true" (I assume you know how to do that).
I could look as follows. Note the look of the conditional terminal: