Quantcast
Channel: LabWindows/CVI topics
Viewing all articles
Browse latest Browse all 5374

while loop stopped by key press

$
0
0

Hello,

I am building an applitation that in one time  in loop collects a data from multimeter and displays it on .uir panel.

I have a probelm with breaking this loop. I want to do that by pressing any key, but it does not work.
I figured out that when program is in that loop, there is no callback recognized.

 

I have tryied with GetUserEvent, but it has not worked. 

 

It could be also a solution to have a callback that generates every 0,5s and refreshes that data, but I do not know how to do that.

 

Code:

/////////////////////////////////////////////////////////

int eventPanel, eventCtrl;
QueueUserEvent (2000, panelHandleFILTER, FILTER);
do{
...


eventPanel= panelHandleFILTER;
GetUserEvent (0, &eventPanel, &eventCtrl);
}while(eventCtrl!=2000);

//////////////////////////////////////////////////

 

Best

Chris


Viewing all articles
Browse latest Browse all 5374

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>