Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Is high-speed data acquisition (200 KS/s) with pci 6224 or usb 6211 possible?

Solved!
Go to solution

Hello,

 

I need some help to accomplish a task. 

 

The Task:

 

Record contact bounce of a switch every 5 microseconds (200 KS/s).  The DAQ cards I have at my disposal right now are the PCI-6224 and the USB 6211. Both cards are rated up to 250 KS/s. I am only concerned with looking at 1 channel that will monitor the voltage.

 

These are the parameters I am using:

RSE 

Continuous Samples

200 KS/s sampling rate

Analog DBL1 chan 1 sam

10 second timeout (Read DAQmx)

 

The Problem:

(1) Whenever I try to sample at 200 KS/s I get an error that reads

 

Measurements: Attempted to read samples that are no longer available. The requested sample was previously available, but has since been overwritten.

Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem.

 

(2) When trying to sample at a much slower rate of 50 KS/s the speed of the loop iteration is not realizing that speed parameter.

 

My question is this: Are these 2 DAQ cards (PCI-6224 or USB 6211) fast enough for my application and I am doing something wrong? OR

      

                             Am I using the wrong hardware to accomplish my task??

 

Thank you in advance,

Gerardo

 

 

0 Kudos
Message 1 of 5
(3,476 Views)
If you are using Analog DBL1 chan 1 sam, then you are not sampling at 200 KS/s. You are doing software timed acquisition and the actual rate is highly variable and unreliable. Why don't you change to NSamp? Then you would actually be using the specified sample rate.
0 Kudos
Message 2 of 5
(3,473 Views)

Gerardo,

There is an example program that comes with the DAQmx drivers that does what you are trying to do.  You can get to it by going to the LabVIEW Help menu, then clicking Find Examples.  When the Example Finder window opens, navigate to Hardware Input and Output>>DAQmx>>Analog Measurements>>Voltage>>Cont Acq&Graph Voltage-Int Clk.vi.  If you are still seeing the same error when running this example program, try increasing the Samples to Read (which is the buffer size). 

 

-Christina

0 Kudos
Message 3 of 5
(3,445 Views)
I have tried the example and I can aquire data for a few seconds at 200 KS/s but the other problem is that I am acquiring 1 sample for every iteration loop.  But if I monitor the iteration loop, I can clearly see that it is not looping 200,000 times per second.  This leads me to believe that I am not acquiring 200 KS/s.  In this application, it is very critical that I am able to sample that fast. So is there something that I am not taking into account when using these 2 DAQ cards that prohibit me from sampling that fast? 
0 Kudos
Message 4 of 5
(3,429 Views)
Solution
Accepted by topic author Gerardo09

The iteration count has nothing to do with the number of samples if you do it correctly. You specify the rate and the number of samples you want and that number of samples are returned. You DO NOT loop 200,000 times. If you request 200,000 S/s and 200,000 samples, you will get that number of samples each and every second. It's really as simple as that.

 

 

Message 5 of 5
(3,422 Views)