LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tdm importer error when opening tdms file

I am getting a error when trying to open a tdms file that had been opened by labview, written to, and then closed. The error is: USI encountered an exception: (175):Error while initializing interface I can sort of understand this error occuring when I have the file open in labview (actually I consider this to be a bug since there is no reason why another application should not be able to access a file in read only mode even if it is currently open by another application) but in my case I am definitely closing the tdms reference and it still will not import unless I stop the top level vi.
Message 1 of 5
(3,897 Views)
Hi sachsm,
 
Would it be possible for you to post a small version of your VI and TDMS file so that I can try to reproduce the problem? If I can I will definitely report it as a bug. But you are right - another program should be able to open a read-only copy. You could put this in as a product suggestion at the following site: NI Product Suggestion Center
 
Thanks!
 
Stephanie
0 Kudos
Message 2 of 5
(3,880 Views)
It is a known bug that if you open a TDMS file with an option other than "read-only", no other process can get access to that file, even if it is just for reading. The issue is filed as CAR#  49794JWJ (status: fixed). This only applies if the file is still open, which you commented on, but which doesn't appear to be your actual problem.

Apparently, you are using the Storage VIs to handle your TDMS files, otherwise you couldn't get a USI exception. Have you tried opening your file with the TDMS File Viewer on the TDM Streaming palette? If that doesn't work, please provide us with your TDMS file, and if possible, your VI. This would be a problem that we're not aware of at this point.

Thank you,
Herbert
0 Kudos
Message 3 of 5
(3,865 Views)
I am using the native TDMS vi's. The problem is just with the excel TDM importer. That is producing the USI exception when I try to import a TDMS file that was last written to in LabVIEW. I do explicitly close this TDMS file in LV prior to trying to import it into excel. I can however use the LV TDMS viewer to look at the same file without any problems. If I stop the vi in question then I can using the importer. That would imply that either I do not know how to use the TDMS close vi or in some cases it does not fully release the TDMS reference.
0 Kudos
Message 4 of 5
(3,858 Views)
What version of LabVIEW are you using? I vaguely remember fixing an issue where we wouldn't close the file properly. That bug would be exisiting in LV 8.20, but not in LV 8.2.1.

A way of checking whether the problem is related to anything specific to your VI would be running an example VI (e.g. TDMS - Write data (events).vi), stopping it and trying to read the file in Excel. That's what I just tried on my machine (using LV 8.2.1, Excel AddIn 2.0.1.1. and Excel 2003), and it worked without a problem.

Herbert
0 Kudos
Message 5 of 5
(3,843 Views)