Thanks for the quick response!
I'm not deliberately trying to have a channel called 13012014140627VoltageAllData ... I think that it may be auto-generated by labview as it's the date and time of the acquisition. Just putting a letter 'D' in front of anything that starts with a number would be fine. But swapping the starting number to the end is fine too.
ps does it have to have all of the data in ram simultaneously before writing it?
For gathering the readings into a 2d array it looks like combining the
for jj = 3: 2+number of logged channels
will hopefully work. I'm hoping this will still work when the logs are long.
Thanks for this. I've logged 34 channels of voltage data at 1 kHz and I'm trying to read it now.
Using the "simple convert" vi I get the error
Invalid field name: '13012014140627VoltageAllData'.
Error in simpleConvertTDMS (line 60)
whether or not I've converted it in labview first. (PS I found that changing the "browse options" property of the output filename control to "new or existing" allowed me to create a new file for the output, as opposed to overwriting an existing file)
I don't get an error using the full version, though it seems a bit tricky to work out where the data is amongst the structures. Is there a simple way to reconstruct the channels of data into a 2d array? Thanks
Geert - If you want to do this: In simpleConvertTDMS, after the line:
Add the following lines:
You need to be cautious about doing this. The variable names are the GroupName_ChannelNames. In your case it looks like the filename is being used as the group name (this may be the default in LV if no group name is specified. Multiple channel groups can be written to the same .tdms file. If different groups have the same channel names, the channel names are no longer unique and can over write each other using the code above. You may just want to go in your LV code and specify a better group name. Info on the structure of groups and channels in tdms files:http://www.ni.com/white-paper/5696/en/
I used the TDMS-convert scripts with success. They almost do what I was looking for. I have one problem: Each data channel is converted to a structure in the workspace with the name of the file+channelname. I only want the original channelname . I tried to find it back in the scripts but honestly they are like chinese to me :)
How can I change this?
Channel name in Diadem/Labview = 'speed'
After TDMS convertion to .mat the structurename is "filename'speed'".
I want to run a loop and for example plot ovelays of many files. Therefore same data names in all files works better for me. Thanks a lot!
Joseph - We have used these functions to translate files up to 3GB. In general it's not a good practice to write TDMS files over a ~1GB. Typically in Labview, we code for a new tdms file to be "auto-started" every ~500MB. This has saved me several times when a file becomes corrupted (by file handling or LV itself) and we don't loose the whole large data set. So I've never had the need to pull out just a segment during translation. It's something I will look at adding though.