Showing results for 
Search instead for 
Did you mean: 

My stop button is not working

Go to solution

@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.

Message 11 of 17

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.


=== Engineer Ambiguously ===
0 Kudos
Message 12 of 17

I don't want the stop button of the inner loop to stop the outter loop. 

0 Kudos
Message 13 of 17


I tried and it worked but I have to press the mover button first then it works.

0 Kudos
Message 14 of 17




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.

0 Kudos
Message 15 of 17
Accepted by topic author lcf2014

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.

0 Kudos
Message 16 of 17

Thank you very much!! It works.

0 Kudos
Message 17 of 17