07-18-2008 07:00 PM
07-19-2008 03:13 PM
07-21-2008 04:14 PM
07-21-2008 07:56 PM
07-23-2008 12:35 AM
07-23-2008 06:31 AM
07-23-2008 10:54 AM
07-23-2008 11:29 AM
Listen - DAQmx basics - A single DAQmx Read can return either one or multiple samples. It really is that simple. If you only have a single DAQmx Read in your program (whether it returns 1 sample or a million), it's still a single read. If you only have one DAQmx in your program, you do one acquisition and no more. In your example, you get no data at all back from the single DAQmx Read until the entire 10 seconds have elapsed. That poses a problem for you. If you change the sampling to continuous, request 1000 samples at the 1000s/s rate, and put it in a while loop, you will get data every second, and after ten iterations of the loop, get exactly the same data you are getting now. It's your decision whether to wait for 10 seconds, 1 second, or a fraction of a second before getting any data back. I would think that you would want to get data back as soon as possible in order to avoid any damage.
Whether you have a single DAQmx Read or multiple, in order to protect your sensor, you can do a comparison in software or design some sort of hardware protection separate from DAQmx.