Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Tips on properly setting sampling rate of DAQ Assistant

I need to collect data from four accelerometers and NI 9234 module at a rate of 4kHz. I am using DAQ Assistant with four input channels in order to do this. By right clicking and selecting properties, I set each channel to continuous sampling mode, 1000 samples, and a rate of 4000 under the timing settings. I also needed to be able to update this on the front panel when necessary, so I wired in two controls to the DAQ Assistant icon in order to set # of samples and Sample Rate. I later noticed that when I changed the settings with the controls it did not update the timing settings in properties. What is the difference between Rate and Number of Samples when wired into the DAQ Assistant icon versus updated manually in properties? If they conflict does one take precedence over the other? Also, I noticed that when I sent the data from the DAQ Assistant to a Measurement File that each data point was separated by about 0.000234 seconds. Is it naive of me to expect exactly 0.00025 seconds (if I set rate to 4000Hz)?

0 Kudos
Message 1 of 5
(3,886 Views)

The timing settings are only set on the first call or after you tell the DAQ Assistant to stop.  So if you want to change the settings, you need to wire up the Stop input and set it to TRUE when on of your timing settings changes.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 5
(3,875 Views)

Hi, do you mean that if I choose "continuous sampling" in timing setting of DAQ assistant, the sampling number and rate are not important? In this case that I choose continuous sampling, the DAQ assistant should be put in a while loop, then how can I control the sampling rate of it? I am really confused here, please help me out, thanks!

0 Kudos
Message 3 of 5
(3,016 Views)

The sample rate is set when you start the test.  In the DAQ Assistant, the task is created when there is no task running, typically only on the first call.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 5
(3,004 Views)

Hi, thanks for your reply. I am new to LabVIEW. As I understand, the "sampling rate" is controlling the rate of "Sample clock" in the DAQ assistant. If I choose "continuous sampling" for the Sample clock and set a sampling rate for it, say only 1Hz, then the sample clock should be placed in a loop. I am wondering if the loop has an influence on the sampling rate? I know that the loop is executed as fast as possible, so if I set sampling rate of 1Hz, will I get many results (because the loop execute so many times in one second) with the same value in this one second or I only get one result? My main problem is that what effect will the loop iteration speed cause to my specified sampling rate? Thanks!

0 Kudos
Message 5 of 5
(3,001 Views)