Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx acquisition at high sampling rate

Hi,

I am curently trying to acquire 2 voltages thanks to a PCI-4472 DAQmx card at a high sampling rate (51200 S/s). Basically, I display the power spectrum of the two inputs in "real-time" (every 40ms) as well as the ratio of their spectrum. I would like to be able to save the incoming signals in a matrix (each column correspond to one input) that I want to use in MATLAB order to do some further off line calculation.

I have been able to display the spectrums and their ratio. I have saved some data into the MATLAB format BUT when I look at what I have actually saved, using MATLAB there is a problem. Instead of a continuous signal, it looks like I have saved a juxtaposition of chunks of 2048 samples (which is actually the "number of samples per channel" argument of the DAQmx read vi I had used for this example). In other words, there is a discontinuity every 2048 points in the graph (which will ruin my frequency analysis in MATLAB). I have interpreted it as a loss of data during the reading process, probably due to the high sampling rate (between 25600 S/s and 51200 S/s) and the relatively long time it takes to perform the different processing tasks ( mainly calculating the power spectrums).

Hence, I have tried to act on the "Relative to" and "Offset" properties of the DAQmx read vi but it produced no improvement: I still had discontinuitues in my saved files.

I have attached my acquisition VI and a subVI linked to it. If someone can tell me what to do, I would greatly appreciate.

Thanks

Bertrand.
0 Kudos
Message 1 of 3
(2,743 Views)
Bertrand -

I took a quick look at your VI. First, since you are writing to the same data file, it is more efficient to just open the file once and close it once. So you can move these VIs outside of the While Loop.

Also, I believe that in the case structure where you are gathering data, the inputs of the build array are backwards. Each time you are actually adding the new data to the top of the array rather than at the bottom which is what I think you want to do.

Jack
0 Kudos
Message 2 of 3
(2,722 Views)
THANK YOU SO MUCH !

I must have been blind not to see that I had misconnected the biuld array VI. Now that I have changed my connections everything works fine now.

Thank you very much again !
0 Kudos
Message 3 of 3
(2,704 Views)