Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx progress event

I would like to take a finite number of samples, but have several progress events. Presently, the only way I can see to do this is by sampling continuously and stopping after I get to the correct number of samples. Is there a better way?
0 Kudos
Message 1 of 6
(6,745 Views)
If you want a finite number of samples, you could also use the acquiredData event . This will get fired only once (when all of the points specified are acquired).

If using the AcquiredData event, you may or may not choose to use the Progress event as well.
Nandan Dharwadker
Staff Software Engineer
Measurement Studio Hardware Team
0 Kudos
Message 2 of 6
(6,745 Views)
I should be more clear. I'm using Measurment Studio 7 DAQmx with with VB.NET. So there are no events, only callbacks. "AcquiredData" is a CWDaq ActiveX control event.
0 Kudos
Message 3 of 6
(6,745 Views)
Joe,
That's pretty much the way you do it..
The typical pattern is to call
(1) BeginRead to start acquisition
(2) When the callback is invoked, do an EndRead to get the data, and
(3) Call BeginRead again..to make the operation continuous.
All of the DAQmx continuous acquisition examples, will do this.
Hope that answers your question...
Nandan Dharwadker
Staff Software Engineer
Measurement Studio Hardware Team
0 Kudos
Message 4 of 6
(6,745 Views)
nd,
Do I need to call EndRead after each progress callback? I want to gather all the data at the end of the scan. For example, I want to read 1000 scans with progress callbacks every 100 scans. But I don't want to append the data to an array for each progress callback. I want to get it all at once at the end. Is this possible? Thanks...
0 Kudos
Message 5 of 6
(6,745 Views)
Hi,

Unfortunately, it is not possible to get all the data at the end yet still have the callback be called periodically throughout the acquisition. The callback is called when the specified amount of data is available. DAQmx is then expecting you to store that data somewhere else. Regards,

Matt P.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 6
(6,745 Views)