09-03-2009 09:24 AM
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
Solved! Go to Solution.
09-03-2009 09:30 AM
09-04-2009 09:30 AM
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
09-05-2009 08:12 PM
09-05-2009 09:56 PM
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.