Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS Advanced, am I doing something wrong?

Hi fellow engineers,

 

I'm trying to implement a simple logging vi using TDMS+ Advanced palette. However, it seems like it slowly consumes memory - and after reading a lot of forum-threads on the issue I was kind of convinced that TDMS+ Advanced palette would not consume memory. 

 

My setup is faily simple, and consists of:

  • Creation of a TDMS file at startup, using TDMS+ Advanced palette (the log is stored on the RT target, but will in the future be stored on a memory stick)
  • Logging of 3 arrays every 2.5 seconds for around 24 hours.

I've done several tests, where i start out with 350 mb of free memory - and after 17-18 hours of logging i'm down to 139-130 mb. After 17-18 hours the file-size is around 150 mb.

 

As i must be doing something very wrong I've attached a screenshot of how i create the TDMS file.

log_creation.PNG

And here is a screenshot of my logging loop, where you see that i write 3 times per iteration in sequence, not in parallell. The buffer-size on the variables are 100 arrays per variable.

 

log_sequence.PNG

 

 

I'm hoping someone could possibly point me in the right direction, as im guessing it's not supposed to behave like it is right now.

0 Kudos
Message 1 of 7
(5,841 Views)

1) You are right that TDMS Advanced nodes don't consume memory.

2) From your screen-shots, I don't see any wrong setup.

3) I suggest you can replace TDMS nodes with file I/O nodes (e.g. Write to Binary) and see if the memory leak still exist.

By the way, if possible, you can upload your VI so other people can try to reproduce and investigate.

0 Kudos
Message 2 of 7
(5,834 Views)

Hello, 

 

I'll try it and see what happens.

 

Yes, I have attached the relevant VI's to this post.

 

0 Kudos
Message 3 of 7
(5,830 Views)

By the way, TDMS standard API (TDMS Write) is more suitable for your case since you re-set the TDMS channels before each write call.

0 Kudos
Message 4 of 7
(5,825 Views)

I was under the impression that the reguar TDMS Write doesn't work with TDMS Advanced Open?

 

I've used the regular VI's earlier and i had massive memory consumation - and ultimatly led me to switch to the Advanced vi's.

 

 

0 Kudos
Message 5 of 7
(5,823 Views)

Yes, you must use TDMS Open instead of TDMS Advanced Open to wire TDMS Write.

0 Kudos
Message 6 of 7
(5,816 Views)

If I do that, i will get that indexing operation that causes a lot of memory consumption - so that doesn't work. 😞

0 Kudos
Message 7 of 7
(5,814 Views)