Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I optimally stream data to disk at 5 MS/s on 4 channels using a PCI-6110?

I am using a PCI-6110 to acquire data streaming from a camera. Data arrives on all four analog input channels at 5 MHz. An A2D clock is attached to PFI8, also originating from the camera and operating at 5 MHz. Finally, there is a Valid-data signal from the camera that signals when the data stream coming in on the four analog channels is actual data (each Validate pulse is about 132 samples wide). This is attached to PFI0. Ideally, I would like to have a program that captures data at the full rate and is correctly synchronized with the Valid-data line. It should also be able to stream to disk for several seconds at least before pausing for the buffer.


Though I'm something of an inexper
ienced programmer, I have attempted programs both in LabView and C (using DAQmx) to resolve this, but I have experienced much slower behavior than I'd like. In LabView, this seems to be the result of slow streaming to disk, such that I have to pause and reset the task every frame (132x512 samples per channel). Using DAQmx in C, I have found it necessary to restart the task after every line (132 samples per channel) in order to correctly trigger from the Validata pulse. Both are far from optimal. I would appreciate any advice that those of you with more experience reading at very high rates from this card may have to offer.

Thanks,
Steven Israel
Duke University

0 Kudos
Message 1 of 2
(2,309 Views)
I'm not sure if I fully understand your application, but maybe some of these hints will help.

First your streaming to disk rate is going to vary widely depending on your system. Sometimes using a faster processor helps, but most of the time using a faster hard drive will give you the best performance increase.

Second, writing less data will often have a dramatic impact in streaming to disk applications. If you're reading back scaled data, I would strongly recommend switching to unscaled or raw reads and storing off the scaling constants so you can scale the data off line. This could reduce the required streaming to disk bandwidth by a factor of 4 alone.

Third, since the 6110 is a 12 bit device, you can try compressing two 12 bit samples into one 24 b
it piece of data. This will allow you to store in three bytes what used to take four.

Last, you might consider using your signal on PFI0 as a pause trigger. Depending on the frequency of the pulses on your Valid-data signal, this could significantly reduce the required bandwidth of both the PCI bus and your hard drive. However, since the 6110 uses pipelined ADCs, you need to be careful if the time between valid data pulses is greater than one millisecond. This would violate the minimum sampling frequency of the board and the points in the pipeline that are returned after unpausing (3 in this case) might not be digitized at the full accuracy specification for the device. Because of the pipelining, you also need to be careful how you correlate the data. The first time you unpause for the Valid-data pulse, the first three points will be garbage points. The second and subsequent times you unpause, the first three points are really the last three points from the previous Valid-dat
a pulse. See the Device Considerations->Timing chapter in the NI-DAQmx Help file for more information on timing considerations with pipelined ADCs.

I hope this information helps. Good luck!
0 Kudos
Message 2 of 2
(2,307 Views)