Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple finite acquisitions in NI-DAQmx w/VB.NET - Stops at 1000 samples

I have written an application using VisualBasic.Net. It takes a 256-sample finite acquisition from a single channel using an external clock and a trigger. This works great if I do it one time only.

However, I must do this acquisition many times very quickly in the application. For each 256-sample acquisition, I call BeginMultiRead and EndMultiRead. I do not change, reset or clear anything else in the task or the reader.

What do I need to do to take 256 sample acqusitions indefinitely?


The first three acquisitions work, but the third only gets 232 samples - in other words a total of 1000 samples all together.
0 Kudos
Message 1 of 2
(2,264 Views)
It sounds like you are filling up your buffer. You are getting 256 samples and then in a software timed loop you are repeatedly aquiring those samples, correct?

If you choose to do it this way, then you need to clear the task after each sample.

Another way you can do it is to setup a continuous buffered aquisition. This will continuously sample the data and return the buffer to your program.

-Sal
0 Kudos
Message 2 of 2
(2,264 Views)