05-07-2015 07:52 AM
While my program is buzy in a for/while loop, is there any way to get out of it upon a button click?
In the vi attached I have loaded an array upon clicking the "load file" button (scanseq.txt file should be located beforehand). After loading the array I have put a "start scan" button which scans the array and displays it with some time delay 200 ms. Now I need a "stop scan" button which allows me to stop the scanning and get out of the while loop. How can I do this effectively? I guess I need not mention that I am a novice in labview.
Thanx,
Shantonu
05-07-2015 07:56 AM
The simple solution would be to disable the "Lock Front Panel Until Event Case Completes" in your event case with the loop.
05-07-2015 10:27 AM - edited 05-07-2015 01:25 PM
Tim's suggestion is of course only a bandaid solution. It is not recommended to put lenghty intereactive code inside event structures, and there is never a need to do so.
Some other suggestions:
05-07-2015 12:42 PM
altenbach wrote:Some other suggestions:
Here's a quick code skeleton to get you started... It still needs work.