LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

quick sampling rate question..

Solved!
Go to solution

Hello, 

I am using USB-6009 and it said the max sampling rate is about 48K samples/sec according to 

the specification..

 

Question 1. 

48 K samples/sec means.. only when receiving 1 analog input ? 

If I have 2 analog inputs then whould it be just a half of 48K ? 

 

Question 2. 

 

using daq assistant.. 

I would like to get about 50 samples between 10ms 

if I do the math I get 5 K samples/sec which is sufficient for me 

 

however, I've been playing with samples to read and sample rate all day long, ,

do not get that rate.. (I'm outputing to LVM format file) 

 

I've searched about sampling rate and people said here 

samples to read and sample rate do not havea  correlation.. 

but I clearly see they are relevent. when I change one parameter 

I get different number of acquisition.. I'm doing N smaples . 

 

please help : ( 

0 Kudos
Message 1 of 4
(2,241 Views)
0 Kudos
Message 2 of 4
(2,236 Views)

if 5k samples/sec is not easy, 

1K samples/sec is fine too.. 

0 Kudos
Message 3 of 4
(2,235 Views)
Solution
Accepted by topic author Johnnykoo

Q1. Yes, except that switching channels takes some time so the net rate per channel is slightly less than half the single channel rate.  The USB-6009 specification document does not indicate what the switching time is.  You should be able to get 5 kHz on two channels.  20 kHz might be close to the upper limit, but that is just a guess.

 

Q2. The DAQ Assistant is often not the best choice for maximum performance.  I do not have the DAQ Assistant so I cannot be more specific. If you acquire the data as an array of DBL rather than the dynamic data type, it can be saved directly without conversions.  The other thing which can make a big difference is changing to a two loop Producer/Consumer architecture.  This allows the data acquistion and the save to file to run at different rates so that each can be optimized separately.  If you are trying to acquire 50 ms of data at a time and then writing it to file, you are writing to the file twenty times per second.  The first time the OS needs to reallocate some file space or do something else which delays the file write, your loop timing gets disrupted.  

 

Lynn

0 Kudos
Message 4 of 4
(2,219 Views)