From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS functions fail on RT Linux when using 100MB+ files

I'm trying to implement a circular buffer on a cRIO-9064 (Linux OS) using a TDMS file and the TDMS Delete Data.vi.

I continuously log data to the TDMS file. When I reach a certain number of data points I want to delete data points from the start of the file, using the TDMS Delete Data.vi.

This will effectively create a circular buffer. During an specified event the RT will rename the file to permanently log the data. It will then create a new circular buffer file and buffer data untill the next event.

 

When I use smaller TDMS file size, this works beautifully. But at a larger file size, TDMS Delete Data.vi starts throwing this error:

Error -2505 occurred at TDMS Delete Data in TDMS Test.vi

Possible reason(s):

LabVIEW: LabVIEW failed to write data to the TDMS file.
=========================
LabVIEW: LabVIEW failed to write data to the TDMS file

 

I cannot look into the code of TDMS Delete Data.VI, but my gut feeling tells me that the error occurs when updating the NI_ChannelLength property, but I can be wrong.

 

Other observations:

- The same code works without problems on a Windows target even with very large TDMS files.

- No error occurs when I set the Count input of TDMS Delete Data.VI to 0.

- No error occurs when I set TDMS Delete Data.vi to delete all data from the file.

- I tried the code with the TDMS file stored on the C and U drive (USB-Stick) of the cRIO, both with no success

- TDMS Defragment.vi shows the same problems. Works with small, but errors with large TDMS files on Linux RT. Same Errors.

- Every write cycle I write 15 channels with approx. 30.000 data points each (2d array SGL)

 

Has anyone an idea how to solve this problem?

A large part of my project depends on this circular buffer working and I already sold TDMS to the customer... I'm in a pickle here. Smiley Sad

 

0 Kudos
Message 1 of 4
(2,830 Views)

Small update:

 

If I try to delete approx. 95% of the data from the file, it works most of the time.

 

Ik tried it with a 11 channels with 9 million data points each TDMS file. Deleting the first 8.700.000 data points works for some reason.

But smaller amounts keep returning error -2505 as discribed above. Smiley Frustrated

0 Kudos
Message 2 of 4
(2,780 Views)

Anyone?

0 Kudos
Message 3 of 4
(2,762 Views)

I found out that if the resulting file is less then 64MB in size, the TDMS Delete Data.VI functions without errors.

If the resulting file is greater then 64MB in size, after data deletion, the function returns error -2505.

 

 

0 Kudos
Message 4 of 4
(2,755 Views)