LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Keep getting Error 6 from TDMS Deframent VI (LV 2009)

After closing my TDMS file I run the TDMS Defragment VI and keep getting Error 6 (generic file error). What could be causing this?

 

George

0 Kudos
Message 1 of 9
(3,923 Views)
One of the possible reasons is that the file cannot be opened, according to the error code. What type of the windows account? Do you have the permission to create files in the windows temporary directory?
0 Kudos
Message 2 of 9
(3,911 Views)
The file had just been created and written to a few steps earlier in the program so I can't see how there'd be any kind of permissions problem. Does it take a while for a file to close before it can be defragmented? I've problems like this before and putting a short delay in helped. But I have a 3 second delay in there now and it didn't help.
0 Kudos
Message 3 of 9
(3,904 Views)
Are you using LV 2009 and produced this problem? And how big of the file? Is that larger than 64MB?
0 Kudos
Message 4 of 9
(3,875 Views)
Yes, 2009 (it was in my title) and the file is < 200k.
0 Kudos
Message 5 of 9
(3,863 Views)
We had a known issue of defragment TDMS files which are larger than 64MB in LabVIEW 2009, but it doesn't apply to your problem. Is that convenient for you to post your VI here? Maybe we can take a deeper look in your code.
0 Kudos
Message 6 of 9
(3,858 Views)

Unfortunately it's very big and you'd need some special instruments as well.

 

I attached a picture of the bit of code used for the defrag.

 

George

0 Kudos
Message 7 of 9
(3,854 Views)

There's a problem of fopen function which is used in TDMS Deframent, http://connect.microsoft.com/VisualStudio/feedback/details/498145/fopen-sometimes-fails-after-callin...

 

It seems the problem not only happens on Windows 7, but also happens on other Windows platform.

 

A possible workaround is to try Defragment for multiple times even the error happens.

0 Kudos
Message 8 of 9
(3,836 Views)

Thanks very much. It sure seemed like a bug to me.

 

George

0 Kudos
Message 9 of 9
(3,826 Views)