05-17-2012 12:06 AM
Hi,
I encountered a system crash whilst writing data to a tdms file and subsequently can no longer access the tdms data and get error code "2503" saying that file does not comply with tdms file format style.
I have read the forums and have seen a few solutions and tried to fix the file using other vi's but the nearest I got was a partial recovery with the majority of the data deleted. My file should have four sets of data, the first 3 are tests and the 4th is the important data, the recovery appears to delete the data in the last section which is the important one and the file is reduced significantly. I did this on a copy of the file so still have the original.
Deleting the index file doesn't help at all.
I have tried copying and opening from a different location which also doesnt work.
I have opened in a file analyser which gives a load of code in the hex section I dont understand but the last write was at a reasonable time stamp for the data to be collected and useful.
The data is relatively simple, measuring different channels of the same format from a DAQ.
It appears that the data is still there as the file is a reasonable size for the expected data but I don't know how to repair and read the data, its really important to access the data, can anyone help?
the files are attached
thanks
-camm-
Solved! Go to Solution.
05-17-2012 01:11 AM
A lot of the code looks like HTML/javascript/etc that has somehow made its way into the tdms file.
05-17-2012 04:53 AM
I have spent some time digging into the file and I quite doubt about whether you had written the main data of the “Thermocouple #3” group before system crashed or not? Inside the file, the data after offset 0xCA000 is quit strange. It looks like a HTML or Java Script. Do you know how many data you have logged for the 4th set? Or can you give a snapshot of the main VI you used to log? It may be helpful for analyzing the file.
05-17-2012 08:02 AM
Hi, thanks for the help.
I have 78 channels and the tdms file is being written directly from the DAQ Assistant that I am using.
The VI does not have any additional recording channel and the outputs from the DAQ are being used to provide charts for visual comparison.
The channels are all thermocouples.
I have attached the .vi here. There are additional features in the vi for a different configuration however these were not being used for the last test, just recording of the channels only
thanks
05-17-2012 10:39 PM
There are 17 segments in the file. Segment from #1 to #15 are all about groups "Thermocouple,Thermocouple#1,Thermocouple#2" and the channels in them. the segment #16, #17 are about "Thermocouple#3" and channels in it which you are really care about. These 2 segments only stored the metadata on them. If everything went right, it should be a segment #18 which should store the raw data on it for the channels in "Thermocouple#3". And this segment should start from offset 0xCA000. But there is no such segment. The data from offset 0xCA000 doesn't comply the format of tdms. Scanning all the data after 0xCA000, there is no even a piece of bytes matching the header format of TDMS. All the data after 0xCA000 looks like invalid memories dumped into file when system crashed. And it makes the file size looked "reasonable".
The conclusion is the raw data for "Thermocouple#3" hadn't logged into file.
05-18-2012 08:42 AM
Okay,
so it looks like I have lost all my data then. Is there any chance the raw data file that you are talking about would be located still in the memory on my computer?
Is there something I can do to avoid this in the future or is it something that is likely to happen again if i have a system failure?
05-18-2012 08:42 AM
Okay,
so it looks like I have lost all my data then. Is there any chance the raw data file that you are talking about would be located still in the memory on my computer?
Is there something I can do to avoid this in the future or is it something that is likely to happen again if i have a system failure?
05-20-2012 08:37 PM
If you have concerns about system hang during logging, I think one proper way is to use "TDMS Flush" at intervals which can ensure your data to be flushed to disk with good TDMS format.