Jump to content

Recommended Posts

OK , i am looking into using TDMS , but , i am struggling to get it to work how i envisioned. I know i am missing something , i am very tired been up for 1.5 days (travelling) ...

anyway , i like the idea of the meta data aspect vs a text file...

what i am looking to do is write 350-400 data points per second , for this particular test it is basically 10 rows x 35 or so columns...

i have mocked up some simulated data etc... when i try to write the 10 rows , it is very slow ... if i write all 216000 rows at once after the data , it is very fast , however , this test will run 12-18 hours , so i do not want to wait until the end to write the data ...

if someone could point me in the right direction that would be great.

Regards

Dan

Link to comment

Several things can be done to optimize TDMS writing.  TDMS has to occasionally write header data to the file to keep track of the data being written.  Because of this you can add one TDMS file to the end of another and it will make a valid file.  You can't for instance append an Excel file (XLSX) to the end of another and get a valid file.

So you want to minimize the amount of times the header data needs to be written to disk.  The easiest way to do this is to write multiple samples at once, or writing multiple channels at once.  You want to avoid writing single samples.  So build up N samples for your N channels and write them once the buffer is full.  The buffer doesn't need to be your whole 12-18 hours.  You can start small with say 10 samples and see how it performs.

Link to comment

Join the conversation

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

Guest
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.