05-09-2008 10:09 AM
05-12-2008 12:26 PM
Hi,
Timeout specifies the amount of time in seconds to wait for samples to become available. If the time elapses, the VI returns an error and any samples read before the timeout elapsed. The default timeout is 10 seconds. If you set timeout to -1, the VI waits indefinitely. If you set timeout to 0, the VI tries once to read the requested samples and returns an error if it is unable to.
By available we refer to the data that has been acquire by
the card and placed into the buffer. You are doing a on sample at a time and
that you are not using the onboard clock. Since you are not using the onboard
clock you don’t have determinism on the rate at which you acquire the samples. “I
think by default the 6052E clock is 1KHz”, incorrect if you select your timing
as on “sample on demand” the rate is controlled by your “timed loop” but since
you are not in a Real Time OS you don’t control the rate of the loop, at least
at very high rates, you may run the first couple of iteration at one speed, then something happens on your PC and you CPU load increases, changing the rate of the while loop.
You have two options to set the rate you can do a software timed operation (i.e. like you are doing right now), but it will be depended on your OS and your CPU load or you can do a hardware acquisition where an onboard clock controls the rate of the acquisition.
“I do not expect this to happen especially that the
PCI-6052E device used in doing the reading operation can run up to 1 KHz. I am
not sure what the problem is.” The problem here is that is not the 6025e not
been able to keep up is your computer. Look at the examples in: C:\Documents
and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\DAQmx
ANSI C\Analog In\Measure Voltage\ and let me know if they help.
You can post your code and I will lok at it if you want
I hope it helps