LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

My VI occasionally doesn't add a .tdms extension and corrupts the data

Solved!
Go to solution

I have a VI in Labview realtime which generates a number of timetraces containing Voltage readings. I use a .tdms format for this. Most of the time it works perfectly, but sometimes it will not add the .tdms extension to my data. The resulting data set is stored on my PXI, but it is permenantly corrupt because no programs will recognise what filetype it is. Furthermore, I am unable to edit the extension in any way, or even delete it. I've tried using webVI, but I get and error: File not found.

 

The same thing happens in Filezilla, I try to delete, transfer, or rename the file and get an error: "File not found"

 

These files take up massive amounts of space on my PXI hard drive, but I am unable to delete or recover them. Any ideas?

 

Thanks

0 Kudos
Message 1 of 6
(2,800 Views)

forgot to mention that I use "concatenate string" to create a filename for my data set. The last element in this is always a string ".tdms" (without the quotes). When I convert it to a filepath is should always have this extension, but for whatever reason it sometimes goes missing!

0 Kudos
Message 2 of 6
(2,797 Views)

K nevermind I found out what is happening:

I use the concatenate to make a sort of automated file extension. For example if this is experimental run 5 at a given setup, I'll put "5" in one of the boxes on the front panel, and "r5" will be added to the filename. If I hit "5" then the enter key, it thinks enter is part of the file extension, and the .tdms will consequently be put in the next line.

e.g.

"Device 4 r5.tdms"

 

will work but

 

"Device 4 r5

.tdms"

 

will not.

 

In the future I'll put a search string function which will eliminate and newline keystrokes to stop bad data.

Any ideas how I can uncorrupt my data that has already been screwed?

0 Kudos
Message 3 of 6
(2,795 Views)
Solution
Accepted by topic author gimNPC
Right-click the string control and select "limit to single line". This will prevent linefeeds.
Message 4 of 6
(2,793 Views)

Hmm, that seemed like the perfect solution, but I just tried it and it didn't seem to do anything - I could still enter the string as multiple lines, and it still concatenated the string with multiple lines.

0 Kudos
Message 5 of 6
(2,791 Views)
You are doing something wrong. Could you make a small sample vi that still shows the problem and attach it here?
0 Kudos
Message 6 of 6
(2,788 Views)