11-17-2016 12:32 PM
@lcf2014 wrote:I've used local variable in the structure that it was stuck and now it works! Thanks, guys.
This is not a solution. Your code is still full of race conditions and constipations. Why do you think it makes a difference if the terminal is in an unrelated event structure vs. directly wired to the stop condition? Also pick the right mechanical action. It still should not work correctly, because the local variable will get read first thing in the loop iteration, way before the event structure even fires.
11-17-2016 12:42 PM
Getting back to basics, if I want a stopp button in an inner loop to also stop the outer loop, I would do something like this.
11-17-2016 12:56 PM
I don't want the stop button of the inner loop to stop the outter loop.
11-17-2016 12:58 PM
11-17-2016 01:02 PM
When I press the parar button and press the stop button my code is stuck there in the image above. So I have to press mover to get out of that and iterate the outter loop and then it stops the outter loop.
11-17-2016 01:06 PM
Edit the event case to also add a parar value change event, change parar to latch action, and wire it out of the event structure and directly to the loop termination. Place the subsequent code in a case structure so it does not execute if parar in pressed.
11-17-2016 01:22 PM
Thank you very much!! It works.