LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

while loop

hi ,

please help me . i want to stop the execution of the while loop when i press the " close button ". 

0 Kudos
Message 1 of 3
(2,255 Views)

Use an event handler in the while loop?

stop_while_loop.png

0 Kudos
Message 2 of 3
(2,245 Views)

If you mean the Windows' close button, you need to catch the VI's Close? event. Set disgard? to true, so the VI get a chance to finish normally.

 

You could put the normal execution stuff in the Time Out event of the event structure. This isn't a very durable solution, but it works in simple situations.

 

 

0 Kudos
Message 3 of 3
(2,241 Views)