Hello Tao,
"For the labview examples I found if the sampling rate is specified with DAQmx timing VI
the read vi is put in a loop without delay. I tried to put a delay I got an error when
I run it."
The reason there is not a delay in the loop is because the loop is forced to wait on the DAQmx Read.vi every iteration. For example, if you set a sampling rate of 10,000 Hz and set DAQmx Read to read 1000 samples, the loop will be forced to wait 100 ms per iteration (1000 samples / 10,000 samples/sec).
"What I want is to acquire certain samples (1000 samples) with sampling rate (10,000 samples/sec) in a loop with delay time (1second)."
For the reason listed above, this does not really make sense. If you set a rate of 10,000 Hz, it will acquire 1000 samples in .1 seconds. A loop delay of one second will lead to a buffer overflow error. To achieve a loop delay of 1 second, insert a wait function set to wait 1000 ms and wire a "-1" to the "number of samples per channel" terminal on the DAQmx Read.vi. This tells DAQmx to read all samples that are available in the buffer when the Read VI is called. At 10,000 Hz, you will read 10,000 samples every iteration.
I hope this helps. Let me know if you have any further questions.
Regards,
Sean C.