Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

High Speed Continuous Analog Acquisition

Hello,

I am trying to use a USB-6356 card to acquire some high speed (~1MHz/Ch x 8 Channels) analog input signals.  The signals are coming from blast gauges that will measure the shock coming from a controlled explosion.  The challenge here is that the duration of the explosion is very short (way less than half a second), but the explosion could happen anywhere inside a 10 minute window.  When the explosion does happen, having 2 seconds of pre-explosion data and 2 seconds worth of post-explosion data would be plenty

 

The specs of the USB-6356 say it can read up to 1.25MHz/Channel, and has a 32 million sample buffer.  So as far as I can tell, at 1MHz/Ch x 8 Ch, I should be able to hold 4 seconds worth of data on the card.  My problem though, is that I cant stream the data to my PC fast enough to log everything on the computer.

 

What I would like to do is to have the DAQ start reading data continuously, but have it overwrite itself continuously.  Then when the explosion does happen, I wait 2 seconds, stop the acquisition, and take the data thats written in the buffer at that time.

 

On page 4-45 of the XSeries manual, however, it says that during continuous acquisition, if I dont transfer data out of the bus fast enough, it will fill up and I will get an overflow error.  Is there a way to disable this error and just allow the overwrite since I dont need that data anyway?  Or am I trying to do something thats simply not possible from a hardware perspective?

 

Thanks

Jimmy

0 Kudos
Message 1 of 4
(3,897 Views)

Oh - and I should have mentioned - I am using MATLAB to run the experiment, and as far as I can tell I have pretty much exhausted the built in features in matlab for solving this problem.  I guess what Im hoping for is a firmware setting that I could change with something in the NI driver package.  If there is a function in a dll file somewhere that would help with this that would be perfect, I could just load it into matlab and call the function from there

 

Thanks

0 Kudos
Message 2 of 4
(3,890 Views)

Hi Jimmy,

 

The overwrite functionality cannot be done by a hardware configuration, this is a function that will have to be implemented in software. Since you are not using LabVIEW, I am not certain of which function will obtain this functionality. I will look for a DLL that will overwrite data in the buffer so that the buffer does not receive an overflow error; however, there is no guarantee that there is a DLL that will have this functionality.

 

Thanks

Kevin S
Applications Engineer
National Instruments
0 Kudos
Message 3 of 4
(3,856 Views)

What exact error code/message are you getting?  There are two possibilies:

 

The driver not pulling samples off of the device and into the pre-allocated DAQmx buffer fast enough.

 

Your application is trying to read samples from the DAQmx buffer that have been overwritten.

 

 

The first issue would be unusual--with such a large onboard FIFO most systems should handle 16 MB/s (8 channels * 1 MHz * 2 bytes/sample) over USB.

 

The second issue is probably what you're running into.  Do you actually need to be reading data other than the 4 second window around the explosion?  

 

If not, you could configure a finite task with a reference trigger to avoid having to read continuously (assuming you have a way to trigger the DAQ card when the explosion occurs).

 

If you need to read some of the data while you're still waiting on the trigger you can specify the Read Relative To and Offset properties and read the most current data that way (DAQmxSetReadRelativeTo and DAQmxSetReadOffset in the C API).

 

 

Best Regards,

John Passiak
0 Kudos
Message 4 of 4
(3,847 Views)