LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

stop execution without stopping interface

I want to stop the execution of my program until an event occurs. So I created a while cicle in which the program controls this event and when the event occurs the condition to exit the cicle is satisfied. But in this way the user interface is completely blocked during the while cicle. Now I need to plot some graph and keep active the interface to permit to the users to cancel the operations in progress. How I can tell the program to wait until the event occur without blocking the User Iterface?

Thank You

0 Kudos
Message 1 of 3
(3,238 Views)

Somewhere inside your while () loop, insert the following line:

 

    ProcessSystemEvents (); 

 

This will ensure that the user interface stays alive. (If I have a very fast loop, I modify this arrangement slightly so that I only call the function as often as I want the user interface to be updated - say every 100-200ms.)

 

JR

0 Kudos
Message 2 of 3
(3,230 Views)
Have you tried to use "Timer" control instead of while() loop?
0 Kudos
Message 3 of 3
(3,154 Views)