Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

what does "rate" mean

I am confused about the meaning of "rate" as used with continuous acquisition mode in the "DAQ Assistant" and "DAQmx Timing" VI.  In the DAQmx Help on how the Buffer Size is determined, there is a table of  Sample Rate vs. Buffer Size.  What does the first entry in that table, "no rate specified", mean?  How does one not specify a rate?  Is "rate" in the DAQ Assistant the same as the Sample Rate?  Does Sample Rate or "rate" work to slow down or speed up the operation of a Data Acquisition device?  Or does the device always work at the same speed while the "rate" is just used to calculate the buffer size?  What do you enter in DAQ Assistant in the "rate" input in order to have "no rate specified"?
 
Thanks!
0 Kudos
Message 1 of 6
(3,916 Views)
Hello. 
 
The rate specified by DAQ Assistant and the rate specified in the DAQmx Timing VI achieve the same same function.  That function is to tell the DAQ card at which rate to sample.  So, if the rate is 1 Hz, one sample will be acquired every second.  If the rate is 1 MHz, 1,000,000 samples will be acquired every second. 
 
However, the DAQ Assistant shouldn't be used with other DAQmx VI's (like DAQmx Timing) since the DAQ Assistant's purpose is to be a "one VI" Acquisition system.  You can use the DAQmx Timing VI with the other DAQmx VI's to build a more customized data acquisition application. 
 
I invite you to look at the following link which should clear this up in more detail:
 
Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications
 
In regards to your question about buffer sizes, when no rate is specified on the DAQmx Timing VI, the default speed is 1000 Hz.  This means that the DAQ card will acquire at 1000 Hz if another rate isn't specified and therefore, in accordance with the table in the DAQmx help, the buffer size will be 10 kS as long as the requested samples per channel is less than the value in the table.  If the value of the requested samples is greater than the number in the table, NI-DAQmx allocates a buffer equal in size to the value of the samples per channel attribute/property.
 
Let me know if this answers your questions completely. 
 
Have a great day!

Brian F
Applications Engineer
National Instruments
0 Kudos
Message 2 of 6
(3,899 Views)

Brian,

Thanks for your response.  That helps quite a bit.  I understand that "not specifying a rate" means not tying an input to the "rate" terminal on the Timing VI.  Is that right?  Am I to understand that I cannot "not specify a rate" in the DAQ Assistant? If I delete the default value in the DAQ Assistant dialog, it automatically puts in a 0 which generates an error.

Thanks!

0 Kudos
Message 3 of 6
(3,898 Views)
Specifying a scan rate of 0 means 0 measurements/second and that doesn't make any sense. The only alternative to specifying a rate in the assistant is using on demand sampling. In that mode, you will take 1 measurement per channel. On demand timing is software timed. That means that how often you take a measurement is dependent on how fast your software can loop. When you rely on software timing, you are subject to the vagaries of the operating system and the pc hardware.
0 Kudos
Message 4 of 6
(3,887 Views)

Dennis, Thanks.  I agree it doesn't make any sense to have a Sample Rate of 0.  When you look for "How is Buffer Size Determined?" in the Help for NI-DAQmx, you get an explanation which includes a table of "Sample Rate" vs "Buffer Size".  The first row of that table is "no rate specified", "10 kS".  My question relates to that first row.  Under what circumstances does that first row apply?  Is it only with On-demand timing?  Is it that every time I use On-Demand timing, a buffer of 10 kS is created?

0 Kudos
Message 5 of 6
(3,881 Views)
Hello. 
 
The 1st row only deals with continuous sampling mode, when there is nothing hooked up to the 'rate' input on the DAQmx Timing VI.  If you do not explicitly choose a rate, the default rate is 1,000 S/s.  So, the buffer will be automatically allocated to be at least 10,000 S.  This has nothing to do with the DAQ Assistant because in the DAQ Assistant, you must specify a rate.  However, in an effort to draw a parallel comparison, when you configure a DAQ Assistant, the default rate that comes up is 1 kHz. 
 
Hope this helps!
 
Brian F
Applications Engineer
National Instruments
0 Kudos
Message 6 of 6
(3,873 Views)