Quantcast
Channel: Multifunction DAQ topics
Viewing all articles
Browse latest Browse all 7019

Daq Sample Rate Question

$
0
0

Hello,

 

I have been trying to understand how the "number of samples" and "rate" controls affect the sample rate for DAQ equipment. For instance, say I want to acquire data from a pressure transducer at a rate of 10Hz. Intuitively I would think all I would have to do is set the "rate" control to the desired sample rate, in this case 10hz, from trying this I know that this is not true. I have read that the "number of samples" control affects the sample rate by setting a buffer value that must be achieved before the VI will process the acquired data. So I have also tried setting the "number of samples" control to 1 and the "rate" to 10, thinking this would results in a 10hz sample rate and again it does not. The only way I know of to control the sample rate is by using Wait (ms) function, but then i always get buffer overflow errors. 

 

Can somone please explain to me the error in my thought process as well as tell me the best way to control the sample rate? Attached is a simple VI I've been using to measure my actual sample rate and compare it to the sample rate I'm trying to achieve.

 

The VI uses DAQ assistant to acquire pressure data, inserts the data into an array, and measures the array size. I am then dividing the array size by the elapsed time in seconds to get sample/sec (I am also dividing the # of loop iterations by seconds and using it as a comparison). I am comparing this value to my inputs for the "number of samples" and "rate" controls in an attempt to make some sense of the role they play in sample rate. The VI also allows you to choose to utilize the Wait (ms) function as well, using this function is the only way I can control the actual sample rate but then i always get buffer overflow errors. Any information would be helpful, thanks!


Viewing all articles
Browse latest Browse all 7019

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>