From: Captain Kirby on
Hi deskpilot, Have you tried your code with a sample TDMS file created by the generator I posted? Is it possible for you to post a copy of your TDMS file to this forum? Or if it is too big, can you just post a suitable sample?
From: deskpilot on
Yes, when I convert your generated tdms file with my code, it works just as I want it to. I cannot post my whole data file, I also cannot post a .tdms file. The file attached is the first 15,000 lines of the data, with the file extension changed to .txt. You should be able to change it back to .tdms and then change the constants in my vi from 60,000 to 5,000 to see my problem. Again, thanks very much for the help.


Partial Data.txt:
http://forums.ni.com/attachments/ni/170/340785/1/Partial Data.txt
From: Captain Kirby on
Hi Deskpilot, I see what you mean. Using your sample, the time column resets at each iteration. I cant see anything in particular that is different between our two samples, but I don't necessarily know how yours was created. I would try to confirm that your TDMS file creation is similar to the example creator I posted. Also try to increase the number of dimensions of the input array to the TDMS file creator. It is possible that the high channel count is causing some problems.
From: deskpilot on
High channel count :smileysurprised: ... That number will double or triple on my real tests.
 
I'm not sure what you mean by increasing the dimensions of the array. I wire the output of a Daq read 1D Waveform directly to the input of the .tdms file writer, which is basically the same idea as your generator. I can use a 2d array output from the Daq Read, but then I don't think I will get a time stamp at all?
 
I modified your sample generator to produce the same number of channels as my data, and it still works fine. So apparently I need to manipulate the data stream before I write it to .tdms? When I have tried to do this before, I lose channel information and the timestamp.
From: Captain Kirby on
Hi Deskpilot, No, the number of channels is not a problem. It turns out the problem is the initial time stamp each of the waveforms has in the output from the TDMS write. The Write to Measurement File express VI will start the X value column fresh each file if it finds a time stamp in the waveform. If you add a time stamp to the built waveform in my TDMS Sample Generator VI, you will see the same behavior with that TDMS file as well. This is normal and expected behavior for the Write to Measurement File VI. So in order for your X values to not reset at the beginning of each file, you will have to strip your timestamp from each of the waveforms created from the DAQmx Assistant.I understand that you wish to keep your timestamp in the header of each excel file. To do this, and keep the same general structure provided by the Write to Measurment File VI, you will need to create a VI that uses the Write to Spreadsheet VIs instead. Unfortunately, you will need to create your own header and attach this to the measurements in each file created. You will also need to pull apart each waveform and create a sutibly formatted array that can be written using these VIs.And just for fun (though it took much much longer then I expected,) I threw together a VI to get you started. This VI opens your TDMS file, converts the waveforms and creates a time value column. And it also converts the channel, group, time, date, and dt into a header that can be attached ahead of the formatted Array. I dont expect that this VI will be exactly what you need, but its a good starting point.


TDMS to Excel no Express.vi:
http://forums.ni.com/attachments/ni/170/342370/1/TDMS to Excel no Express.vi