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?
Solved! Go to Solution.
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
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!
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?
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.
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:
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!