01-06-2010 11:54 PM
Hi,
I am using a simple while loop in an event structure.
The problem is that i am not able to stop the while loop by stop button.
01-07-2010 12:02 AM
Because you have the properties for the OK button value change event set to lock the front panel until the event completes.
I suggest you search the forums for message threads dealing with while loops and event structures. I'm sure you'll find your question would have been answered hundreds of times before.
Your code is inside out. In general, don't put a while loop or any code that takes a long time to execute inside an event case. The event structure itself should be inside a while loop.
01-07-2010
01:25 AM
- last edited on
06-11-2025
12:29 PM
by
Content Cleaner
Ravens Fan a écrit:I suggest you search the forums for message threads dealing with while loops and event structures. I'm sure you'll find your question would have been answered hundreds of times before.
I also strongly recommend to read the Caveats and Recommendations when Using Events in LabVIEW.
01-07-2010 01:37 AM
Hello,
I have read you question perfectly & solve it. but I can not excess your due to your higher version of LabVIEW than me. So I attached here my logic to you. To event structure simply enter the any timeout value then you will able to stop the while loop by stop button. I hope you get your desire answer.
Thank you
01-07-2010 02:12 AM
Vinal G wrote:So I attached here my logic to you.
That code makes absolutely no sense.
01-07-2010 02:59 AM
Hi shrekt,
Just you need to uncheck the option "Lock front panel untill the event completes" (this option will beat the bottom of edit events) andthe code will work fine.But always dont try to put while inside a event structure(good programmng practice).
Thanks and regards,
srikrishnaNF
01-07-2010 03:30 AM
Hi guys,
Thanks for replying,
I got the logic changeto avoid any other problem.
Thanks
Regards,
Shrek