LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Daqmx Sample clock

Hello,

I am using Daqmx Sample clock function and I am a little confused about the input " rate" of this function.

In Labview Help, this inut is defined as below:
"rate" specifies the sampling rate in samples per channel per second.
Now I set this " rate" to be 8000 and I have 8 channels, Does this mean that the sampling rate of the whole device is 64000? The samples per channel is 1000, what is the buffer size allocated by labview? Is it 8000?

Thanks in advance, I am looking forward to the replies.
0 Kudos
Message 1 of 5
(4,155 Views)
The buffer size is set automatically by DAQmx. The requirements for the buffer size are determined by "sample mode". Are you acquiring data continuously, acquiring a finite number of samples, or Hardware Timed Single Point.

If "Sample Mode" is finite then, NI-DAQmx allocates a buffer equal in size to the value of samples per channel.
If "Sample Mode" is continuous, NI-DAQmx will allocate a buffer according to the sample rate.
0 - 100 S/s = 1 kS buffer
100 - 10,000 S/s = 10 kS buffer
10,000 - 1,000,000 S/s = 100 kS buffer
1,000,000 S/s = 1 MS buffer

See this link to a knowledge base article.
http://digital.ni.com/public.nsf/allkb/E1E67695E76BA75B86256DB1004E9B07

Chad
0 Kudos
Message 2 of 5
(4,148 Views)
I have read the table you gave before but that is what confusing me.

I put a control to the " rate" of the "sample clock" VI and I set it to be 8000 and I have 8 channels. My question is that what is the sampling rate of the acquision system?
0 Kudos
Message 3 of 5
(4,144 Views)
Below is another knowledge base article.
http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/dbe7ac32661bcf9b86256ac000682154?OpenDocument

You said that you have eight channels. Are these channels setup in MAX and if so are they global channels or just one Task? Or are you creating a Task in LabVIEW?

If you are reading these channels as a single Task, then each channel is being sampled at "sample rate". Then the buffer size is dependent on "sample mode". If it is continuous then use the chart, but if "Sample Mode" is finite then, NI-DAQmx allocates a buffer equal in size to the value of samples per channel.

When doing finite, "sample rate" is the rate at which the channel will be sampled and "samples per channel" is the number of samples to return. So if sample rate = 1000 and number of samples to return = 100, then 100mSeconds of data will be returned ("number of samples to return/"sample rate"). In other words the channel will be sampled at 1000 until a total of 100 samples has been received.

Chad
0 Kudos
Message 4 of 5
(4,136 Views)
OPG,

If you have 8 channels and specify a sample rate of 8000, then you should sample from all 8 channels at a rate of 8000 samples per second, giving you a total throughput 64000 samples each second. If you want to test this, simply perform a finite acquisition with your 8 channels and specify your number of samples per channel as 8000, and your rate to 8000 S/s. You should see that the acquisition takes about a second, and if you look at the resulting data on a waveform graph, you should see that all 8 channels have 8000 data points.

Hope this answers your question,
Dan
0 Kudos
Message 5 of 5
(4,132 Views)