LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

interupt a process to access 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. (CVI LabWindows platform)
0 Kudos
Message 1 of 2
(2,722 Views)
Seems that you need an ProcessSystemEvents () call inside your while loop. By means of this function, updates in the user interface (i.e. button pressing and so on) are processed inside the function. If this function is not present, all changes in the user interface are ignored.

You can arrange your panel to show only a 'Stop acquisition' button, always active. When pressed, the corresponding callback is triggered, into which you can raise a flag to inform the acquisition process it has to stop when ready and safe. When the process stops, you can enable all the commands and buttons you need to configure the new acquisition and then use a Go button to start the while loop again.

Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(2,722 Views)