Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Fastest acquisition possible

Hello all!

I'm trying to acquire a simple sample and process it as fast as possible using a PCMCIA 6062E board.

I'm acquiring a single channel.

If I read one sample at the fastest sample rate (500kS/s) achievable with my board I'll get an error due to the fact that the board buffer will be quickly filled and after that samples will start to be lost. Using 500kS/s as the sample rate, each sample would be spaced by 2 microseconds and this is very fast and I'm sure that the following processing stages do not complete faster than this (eventhough they are simple tasks such as comparisons, multiplications, sums and display values in a chart)

I've changed the sample rate in order not to receive the same error and just after 15kS/s I've succeeded.

I understand why this is happening but acquiring at 15kS/s I will only be able to "correctly" sample signals with a frequency as high as 7kHz (regarding Nyquist's theorem).
Using this sample rate each sample is spaced in time by aprox. 67 microseconds.

Is there a way of improving this? Remember I want to acquire and process sample by sample...
0 Kudos
Message 1 of 6
(3,336 Views)
Hello.
 
What error do you have when you increase the sampling rate?
 
Can you attach your VI? It would be easier for me to see how you do your acquistion.
 
You also can take a look at this link: http://zone.ni.com/devzone/cda/tut/p/id/2835#toc3, and you can also see LabVIEW examples.
 
Thanks.
0 Kudos
Message 2 of 6
(3,319 Views)
Thank you for your reply.

The error I receive is the -200279: "Measurements: Attempted to read samples that are no longer available. The requested sample was previously available, but has since been overwritten..."

Below, you have the .vi attached.

Regarding this task and this .vi is there the need to use the "Daqmx start task.vi", if I remove it my .vi also runs... How does it know when to start acquiring?

Thanks in advance.

Best regards!
0 Kudos
Message 3 of 6
(3,314 Views)
Hello.
 
The start task vi is necessary if you do a continuous acquisition. You can look at  the LabVIEW help to have more details.
 
Concerning your error, it's due to the fact that you don't empty the PC buffer quick enough because you read just one sample at every loop.
 
To avoid this, you can decrease the sampling rate and increase the PC buffer size (equal to "Samples per channel" in the DAQmx Timing VI). The other solution is to increase the number of samples to read but tou want to read the samples one by one.
 
These are some useful links:
 
 
Good luck.
 
 
 
 
 
Message 4 of 6
(3,309 Views)
Thank you for your answer.

The links were interesting and useful.
0 Kudos
Message 5 of 6
(3,289 Views)

You're welcome.

Don't hesitate to seek for an answer if you have other questions.

Good luck.

0 Kudos
Message 6 of 6
(3,276 Views)