11-23-2015 11:46 PM
The property "NI_ChannleLength" is calculated by TDMS itself, it's the number of the data values of the channel, it's not explicitly written anywhere in the file.
11-24-2015 02:32 AM
@YongqingYe wrote:
The property "NI_ChannleLength" is calculated by TDMS itself, it's the number of the data values of the channel, it's not explicitly written anywhere in the file.
If that's true then it's still quite worrying that the calculation is NOT being done on the file before I close and re-open it. Once I close the file and re-open it, it seems to work again.
11-24-2015 02:35 AM
@YongqingYe wrote:
The simplest way to get to the end of the file is, first to get the size of the file and then use Set File Position.
I thought of that yesterday evening. For some reason I thought the "standard" file operations would not work on the TDMS files. It may well have been an overzealous assumption on my part. I thought a little about why I assumed that and I think it was along the lines of "Anything at the same level or below the OPEN function in the palette hierarchy can be used with that refnum, but not something above it in the hierarchy - the standard file operations".
11-24-2015 07:36 PM
Yes, I think it's the expected behavior.
11-25-2015 02:42 AM
@YongqingYe wrote:
The simplest way to get to the end of the file is, first to get the size of the file and then use Set File Position.
Wiring a TDMS refnum to the "Set File Position" results in a broken wire on my machine.
11-26-2015 08:15 AM
So I'm running the danger of rutning this thread in a noob's guide how to fail with TDMS but whatever......
I have observed some serious slowdown when writing a large number of groups and channels to my TDMS files. My data can be spread over thousands of groups, each with theoretically thousands of channels. This seems sub-optimal.
My write speed decreases dramatically as the total number of groups / channels increases in my file. Writing each group to it's own file significantly speeds things up (with a small dataset (40MB) it's three times faster writing to 40 files with one group each than one file with 40 groups. Three times faster.
Why is this?
I also noticed that although the sector size of the disk I am writing to is 512 Bytes, each chunk of META data occupies 4096 bytes on disk, filled nmostly with NUll. Again, why is this? Whouldn't the META data write consume only as many sectors as it actually requires?
11-26-2015 07:37 PM
Sorry, I mean to use "TDMS Set Next Write Position" to write data.
11-26-2015 07:40 PM
4096 bytes for the meta data is expected behavior. TDMS uses 4096 as the "meta data buffer size". TDMS has to take care of different disks, some currently use 512 byte, and some uses 4096 now and in the future. 4096 still can be compatible with the disks which use 512 as the sector size.
11-27-2015 03:21 AM
But the function "TDMS Set Next Write Position" requires a group and channel input, so it really is as I said earlier in my post that I need to keep track of the last group and channel written to. So basically, there is not ohter method than I have mentioned previously.