Jump to content

Not enough memory to complete this operation error when converting large .tdms to .txt


sts123

Recommended Posts

Posted

Also, if you are exporting large TDMS files to even larger text files, you should think hard if that is really the right move. Find a way to handle TDMS files in the next program. People have written importers for e.g. MATLAB and Python.

Posted
16 hours ago, cordm said:

Also, if you are exporting large TDMS files to even larger text files, you should think hard if that is really the right move. Find a way to handle TDMS files in the next program. People have written importers for e.g. MATLAB and Python.

So, MATLAB or Python are more efficient to convert TMDS to .txt?

Posted (edited)

There should be a way to work with very large files in LabVIEW without having to keep the entire file in memory.

Many years ago I worked with a very large file in Matlab (well, back then it was a very large file) and I extensively used the function memmapfilehttps://se.mathworks.com/help/matlab/ref/memmapfile.html

It is a way to map a file on the harddrive and access its content without having to keep the entire file in workspace memory. A bit slower I assume but far less load on the RAM!

There must be a similar method in LabVIEW.

 

EDIT: I found this old thread: https://forums.ni.com/t5/LabVIEW/Is-there-a-way-to-read-only-a-portion-of-a-TDMS-file-without/td-p/1784752

This is something similar to what cordm refers to:

On 6/30/2025 at 9:33 AM, cordm said:

or use the offset and count terminals of TDMS Read to read data subsets.

Best practice regardless of language must always be to handle large files in chunks.

Edited by codcoder
Posted (edited)
7 hours ago, sts123 said:

So, MATLAB or Python are more efficient to convert TMDS to .txt?

Of course not! But TDMS is binary, text is ... well text. And that means it needs a lot more memory. When you convert from TDMS to text, it needs temporarily whatever the TDMS file needs plus for the text which is requiring even more memory.

Your Matlab and Python program is not going to do calculation on the text, so it needs to read the large text file, convert it back to real numbers and then do computation on those numbers. If you instead import the TDMS data directly to your other program it can do the conversion from TDMS to its own internal format directly and there is no need for any text file to share the data.

Edited by Rolf Kalbermatter

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.