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