LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting number of samples to read using the "sample clock"-VI

Hi, there!
 
I came across a strange phenomenon when setting timing parameters in LV8 using the sample clock VI. I wanted to read 1000 samples pr channel and wired this number to the sample clock VI input. When running the program, DAQmx simply ignored this value and calculated its own sampling rate. What's more, this rate was not constant. It varied between 799 and 800 samples. When setting the samples to read parameter in the DAQmx Read VI instead, everything worked perfectly. What's going on?
 
Regards,
Einar
0 Kudos
Message 1 of 3
(1,855 Views)

Hi Einar,

Samples per channel on sample clock VI  "specifies the number of samples to acquire or generate for each channel in the task if sample mode is Finite Samples.

If sample mode is Continuous Samples, NI-DAQmx uses this value to determine the buffer size"

So, in continous mode, this parameter does not specify 'number of samples to read' per iteration during DAQmx Read. Now, samples to read on DAQmx read Function does this job.

Hope this answers your query

Dev

Message Edited by devchander on 05-26-2006 03:51 AM

Message 2 of 3
(1,845 Views)

Hi, Dev!

It certainly answers my question. Thank you very much!

Einar

0 Kudos
Message 3 of 3
(1,835 Views)