Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

HOW to show acquisition status to a user?

I am using componentworks for visual c++, and
implementing an application program for acquring signal
from pressure transducers. This program typically acquires about 32000 data with 4000Hz sampling rate.
so it takes about 8 seconds to receive ACQUIREDData message.
But during this acquisition the program looks to be halted(with no update on display), and I want to show an user that the acquisition is undergoing using some user interfaces like a progress bar. How can I implement this feature? After starting the Analog Input, it seems that I must wait until the ACQUIREDData message is returned.
0 Kudos
Message 1 of 2
(2,824 Views)
Hello

You should use asynchronous reads (instead of the AcquireData method) if you want to not hang the UI thread during acquisition. Configure the CWDAQ control, call start and when the data is ready, the AcquiredData callback should fire. The UI should not hang while the acquisition is happening. Check out some of the CWDAQ examples that were written in VC++. They should demonstrate this as well. You can find them in a zip file here

I hope this helps

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 2
(2,824 Views)