LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stop 3 while loop

Hi..
I want to stop 3 while loop at the same time without any delay with a single stop button. Attached is the loop configuration of my Vi. But when I press stop button, then the loop 2 does not stop at the same time but after one more iteration. Is it a problem of i value?
Hope someone will modify it.
Regards
Sandy
0 Kudos
Message 1 of 3
(2,687 Views)
You are seeing one of the problems with using locals and globals, the race condition. There is nothing that synchronizes the loop that contains the stop button and the one that has the local. When you press the stop the other loop may be anywhere in its execution and will complete that before reading the button. Also, with loops, they will execute once, regardless of the conditon of their stop flag.
 
You should not create a new thread for the same problem when you have a change to the message, like adding a file. Just continue in the original thread, even if it is a somewhat divergent question. Those of us trying to help you may scan for new questions in threads we are following and miss your "new" posting when you create a new thread.
 
P.M.
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 3
(2,681 Views)
So Sorry ..This was not my intention. I was in hurry and keypress went wrong. That made this problem.The original message was with the attachment.
 
0 Kudos
Message 3 of 3
(2,679 Views)