LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS error -2505 on close?

Solved!
Go to solution

Hi all,

 

We are supporting some legacy software running on PXI (RT). It is LabVIEW 2010, and the project is large enough that it is difficult to extract a small demo VI that exhibits the same behavior. I'll do my best to describe the problem.

 

We see this frequently, but not consistently. The program sometimes throws error -2505 when calling TDMS Close. The program calls TDMS Flush immediately before closing (I don't know why it was written that way... that shouldn't need to happen). There should therefore be no data that needs to be written when we call TDMS Close immediately thereafter.The explanation of -2505 is "LabVIEW failed to write data to the TDMS file," which it should not have needed to do.

 

Has anyone seen anything similar? Is there a workaround other than clearing error -2505?

 

0 Kudos
Message 1 of 7
(1,337 Views)

Hello malocascio,

 

two things, first is the file system FAT or reliance, you can try FAT, if it is not in use.

The second, how big is the file, try to make smaler files with 64 MB or less.

 

The other workaround with flush after writting is in use like you wrote, but this workaround seems not working on your side. With newer version of LabVIEW some fixes are included, which also solves such behaviours

best regards
Alexander
0 Kudos
Message 2 of 7
(1,288 Views)
Highlighted

Hi Alexander,

Thanks for your reply. This system is using the Reliance FS, and the files are not very big, but are written often. Is FAT a better choice? My client is somewhat reluctant to upgrade LabVIEW, but I would like to do that when time allows.

 

I occasionally get different file I/O errors as well. For example, I just ran the program for two hours before it exited with code 1 when the program tried to delete a file. The file DID get deleted, though... It seems like the file I/O is really flaky altogether.

 

If anyone has additional thoughts, please let me know. Thanks!

0 Kudos
Message 3 of 7
(1,275 Views)
Solution
Accepted by topic author malocascio
02-08-2017 07:12 AM

Hello malocascio,

normally reliance is better, but in some cases it could help to use FAT.

best regards
Alexander
0 Kudos
Message 4 of 7
(1,273 Views)

I don't expect that it makes much difference, but I also sometimes see the same error, -2505, reported as originating from the TDMS Flush instead of the TDMS Close. Any thoughts on why that might be?

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

Hello malocascio,

 

like i explained there are some issues in the LabVIEW 2010 version and from my side try to update LabVIEW, using FAT or play with the flush function to avoid the error.

best regards
Alexander
0 Kudos
Message 6 of 7
(1,240 Views)

Hi all,

 

Alexander was correct. Evidently there is a bug related to the Reliance filesystem in LV2010. NI told me that it has been corrected in LV2011 SP1. Two things worked in my tests:

  1. Formatting the drive as FAT instead of Reliance
  2. Upgrading to LV2016

For your reference, I was told that error -2505 is a catch-all error. If you see it, it means that something caused the application to be unable to write to the file, but a more specific error is not available.

 

Thanks for the help!

0 Kudos
Message 7 of 7
(1,207 Views)