Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Sampling 2 channels at a rate of 400 kHz

Solved!
Go to solution

Hi Andy,

 

Apologies, I just noticed I mentioned the file size for data I acquired using 1 channel. I actually want to use the files in matlab 2007a to do post acquisition analysis of the data, for which I am trying to read TDMS files in Matlab. I have also tried using the TDMS add-in for Microsoft excel. But as you mentioned I was uploading all the data at once and getting the error. Is there a way to convert TDMS file to excel file so I can read them in matlab? Also you  mentioned I can read parts of the file at times,how can I do this?

 

Thanks,

0 Kudos
Message 11 of 15
(1,420 Views)

Hi ygupta,

 

you might want to try the TDM Matlab Example. The TDM-C-DLL, used by this example, supports a function to chunkwise load data from a TDMS file:

DDC_GetDataValues

 

int DDC_GetDataValues (DDCChannelHandle channel, unsigned int indexOfFirstValueToGet, unsigned int numberOfValuesToGet, void *values);

 

Stefan

 

 

0 Kudos
Message 12 of 15
(1,401 Views)

Hi Stefan,

 

thanks for your reply. I have used that example to open my tdms files but I can't see my data samples in the matlab workspace, although I do get a graph for the data samples.

 

Currently I am saving the data in a series of tdms files, so what I want to do is to convert tdms files into excel files, As it would be easier to import data from them into matlab. Any suggestions?

 

Thanks,

0 Kudos
Message 13 of 15
(1,378 Views)

Hey ygupta,

 

It sounds like you are taking a really round about way to do your analysis; you are collecting a large amount of data that a lot of visualisation and analysis packages (such as Matlab) will choke on (or at least be veeery slow to process).  I feel your love for Matlab, but is there anyway that you can do some initial processing to reduce the size of the data set in Labview before pushing it into Matlab for final analysis?  Depending on what version you have, Labview should be able to do much of your rudimentary processing and visualization at least as fast if not faster than Matlab.  If you can do some of your initial processing in Labview, this should reduce the data set sufficiently to get rid of your importing problems that you are having.  And even better, NI provides routines that allow you to use Matlab scripts that you have already developedSmiley Happy.

 

Anyway, just a thought.

 

Cheers, Matt

0 Kudos
Message 14 of 15
(1,371 Views)

As a suggestion, in the past I've done the "Open/Create" a number of files, in a For-Next Loop, for example, which returns an array of pointers to each of the newly created files. When writing to the files, I also do a check on the file-size to determine that it doesn't exceed a certain limit. At the limit, I simply switch to from one to the next file pointer, and continue writing the data. This has worked in a number of applications for me.

 

Hope it helps

 

DOK

0 Kudos
Message 15 of 15
(1,359 Views)