03-24-2010 11:44 AM
Hi, all,
I'm using a PCI-6259 DAQ card right now to read data from multiple channels. However, I don't really understand the "sample to read" node in "DAQmx read.vi".
In my opinion, if I use the DAQ to sample multiple channels, this "sample to read" would be the number of samples per channel. But I'm not sure if the sampling is simultaneously or not? If not, how to make simultaneous samples for different channels? According to the user mannual, the DAQ should support simultaneous sample of difference channels, or I was wrong?
Kind regards,
Rui
Solved! Go to Solution.
03-24-2010
12:21 PM
- last edited on
03-11-2025
09:55 AM
by
Content Cleaner
03-24-2010 12:25 PM
Thank you.
So if I want the inter-channel delay to be small, I can just reduce the number of sample per channel, is that correct?
03-24-2010
12:49 PM
- last edited on
03-11-2025
09:55 AM
by
Content Cleaner
No, not at all. It is affected by the sample rate. See this.
03-24-2010 01:03 PM - edited 03-24-2010 01:09 PM
There are three parameters that control the timing of an acquisition in DAQmx:
Sample Rate
This controls how fast samples are taken. This is specified in terms of Samples per Second.
Samples Per Channel
For a finite acquisition, this is the total number of samples that your program will acquire. For a continuous acquisition, this is just used to help determine the buffer size.
Samples to Read
This is a setting on the DAQmx Read VI. This determines how many samples per channel are returned each time that Read VI is called. A value of "-1" returns all the samples that are available. If the specified number of samples aren't available with the Read VI is called, the Read VI will block until the samples are available, or until the time that is wired to the "timeout" terminal elapses.
So, for example, if we have an application with the following parameters:
Samples Rate = 1000 S/s
Samples per Channel = 5000
Samples to Read = 100
Then the application will gather 5000 total samples at a rate of 1000 samples per second. The total acquisition will thus take 5 seconds.
We will need to call the Read VI 50 times, because each time we call the VI, it will return 100 of the available samples.
Inter-channel delay is controlled by the AI Convert Clock Rate property. The smallest value it can be set to is the inverse maximum aggregate sampling rate for your board. The default rate is 10uS to allow for additional settling time, unless your sampling rate is above 100 kS/s, in which case we use the smallest possible value.
So, for example, my PCI-6289 has a maximum aggregate sampling rate of 500 kS/s (as indicated by the specifications.) So, my minimum inter-channel delay is the inverse of 500 kHz, or 2 uS.
You can set the AI Convert Clock Rate using the DAQmx Timing Property Node:
Hope this clarifies things!
03-24-2010 01:20 PM
03-24-2010 02:19 PM - edited 03-24-2010 02:23 PM
If you have a board that does simultaneous sampling, such as one of our S Series boards, DSA boards, or a simultaneously sampled X Series board, then simultaneous sampling happens by default. The AI Convert Clock Rate property isn't supported because the boards always sample simultaneously. The property will return an error if you try to set it on a simultaneously sampled board.
Regards,