LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

interupt a process to acess control buttons

I'm running an MIO 16E card using EasyDaq function. I'm running the "AIAcquireTriggeredWaveforms" inside a while loop to continuously update data at an incomming trigger. Works great, works really fast but.. What is the prober way to access or interrupt the process to access control buttons to change parameters in the acquiring while mode to change trigger conditions or gain. The program works like an oscilloscope and changing gain and sweep is necessary. Right now I have to terminate the program to make any adjustments.
0 Kudos
Message 1 of 3
(2,710 Views)
The easiest method is just to insert a ProcessSystemEvents() call in your while loop. This will slow the loop down some, but it will allow the processing of any user interface events if they occur. If this slight slow down is not acceptable, you would need to look into multithreaded programming.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 2 of 3
(2,710 Views)
Without seeing your code or your panels, it sounds like you need to ProcessSystemEvents() in your while loop. A while loop in a callback can lock-out the rest of the user interface. Read the on-line help for ProcessSystemEvents().
Also, make sure that the panel with the controls you need to use to change the parameters is (or can be) the active panel: e.g., don't have a dialog box open (to abort the loop or quit the program)on top of the panel.
0 Kudos
Message 3 of 3
(2,710 Views)