09-11-2008 10:36 AM
Hi. I am trying to use a routine like this (I am using VB .NET and NIDAQmx Libs):
myTaskAnalogInReader.BeginMutliSampleRead(...;...;...)
Application.Doevents()
system.threading.thread.sleep(sleeping_time)
when I call sleep function.. so does the buffer collect data during the sleeping_time?
Regards
Vijay
09-12-2008 03:40 PM
Hello Vijay,
Thank you for posting on the NI Discussion Forums. Once you have began an acquire (read) on a signal on your data acquisition device, your program will read the signal values from the device’s on board buffer when the buffer reaches a certain point. So, you can put the thread to sleep, and should be able to wake it up and take data from the buffer, but if you acquire too many samples while the thread is asleep, then you will obviously be losing (overwriting) data in the buffer.
Of course, the best way to check this is to actually try it out. Use the EndReadMultiSample( ) method once you wake the thread and see (1) if an exception occurred, and (2) if the number of waveform samples you expect to see are returned.