Hi densmore,
Do you want to read a continous amount of data or finite ?
I have to admit that i'm a little confused about why you are reading 2 points at a time.
(though this code may just be a snippet of what you want to do...)
imo a more efficient way to do it would be to specify 10 points in the ConfigureTiming call, and then specify 10 points in the BeginRead (not 2). Whenever your 10 points are read, the callback is called...
Since the BeginRead is asynchronous, (and the actual read occurs in a different thread) really the amount of data that u are reading does not matter, in that the UI WILL remain responsive thu out the operation..(if that is a concern).
This way you do not need the myTask.IsDone block and you do not need to call any additional BeginRe
ads (you'll have just one instead of 5).
The AcqVoltageSamples_IntClkAnalogStart example,that ships with MeasurementStudio (MeasurementStudio/DotNEt/Examples/DAQmx/AnalogIn/MeasureVoltage )would be a good reference, without the triggerring of course..
If you want to read a specified amount of points continuously (say 10 points continuously) then you don't need to set the number of samples in the ConfigureTiming. You can set the ConfigureTiming to be Continouos (instead of finite) and then specify the numberOfSamples to read as an argument to the BeginRead..
Hope this helps, if it doesn't
🙂 or if you have any more questions then please feel free to email us again..
Best regards!
Nandan Dharwadker
Staff Software Engineer
Measurement Studio Hardware Team