LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure tdms advanced read

Solved!
Go to solution

Hi

 

I am trying to read a tdms file using advanced TDMS VIs to get a faster reading speed but when I disable the system buffering then I get error -2544 which says that "the array sizes and file positions must be integer multiple of the disk sector size". My disk's sector size is 512 and I am using a buffer of 256 samples with I16 data type which is an integer multiple of the sector size. I have attached the code snippet.

If I use the example VI "TDMS Advanced - Finite Asynchronously Read.vi" it works fine with the file created for the example VI but it doesn't work with my file which has data in I16 format. I am also attaching the example VI.

What could be the reason? please help me out

 

thanks!

Mani

0 Kudos
Message 1 of 3
(3,139 Views)
Solution
Accepted by topic author Manigreatus

According to error -2544, either array sizes or file positions is not disk sector size aligned. In your case, since the error is thrown by "Set Next Read Position", probably the target file position is not disk sector size aligned. Is your TDMS file created by TDMS Standard API or Advanced API ? In the latter case, each TDMS head (which contains meta information) is 4K aligned thus easily to set to a sector size aligned position. If it's created by "TDMS File Write", the sample position you want to read from is probably not sector aligned, thus returns error -2544.

0 Kudos
Message 2 of 3
(3,115 Views)

Thanx alot deppSu!

 

Now I used a file that was written with the TDMS advanced API and its working as expected. But interesting thing is that with system buffering disabled my file reading speed decreased to 25% of the speed which I was getting system buffering enabled Smiley Surprised.

 

regards,

Mani

0 Kudos
Message 3 of 3
(3,101 Views)