LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Copy and rename TDM file (TDX file problem)

Hi

I have the following problem. I have two loops in parallel where one loop is saving to a tdm file.
The other one should copy the saved data from time to time into another file as a kind of backup.

I do the following during the backup procedure.
Stop the aquisition loop, close the reference to the tdm file where my data is saved to, then use the copy file function and copy the *.tdm file to an other filename.
After doing this the aquistion starts again with the old filename and stores the data.

The problem is now as followed.
The file is copied properly but when the copied file is acessed by DIADEM it is somehow corrupted because the *.tdx file with the old filename is not accessible.

When I completely close my labvie instance it is possible to open the file but i am not able to close the refernce to the *.tdx file or copy also the *.tdx file.

I hope somebody out there has has a similar  or the same problem  and is able to help me.

Thanks

Gernot

Gernot Hanel
IONICON Analytik Gesellschaft m.b.H.
0 Kudos
Message 1 of 3
(3,564 Views)
Notti,

the problem is that the TDM file contains a reference to the TDX file. Since you are changing the filename, the TDM file will continue to point to the TDX file with the previous name.  The way I rename TDM files is that after copying, I read the whole *.tdm file into a string and to a "search and replace" with the old and the new filename. You can use this VI as boilerplate code for doing that:
.\vi.lib\express\express output\ExFileWriteBlock.llb\ex_BackUpExistFileTDM.vi

Hope that helps,
Herbert
Message 2 of 3
(3,555 Views)
Thank you very much.

This helped a lot and I solved the problem with your sugegestion.

Best regards und schöne Grüße aus

Tirol

Gernot
Gernot Hanel
IONICON Analytik Gesellschaft m.b.H.
0 Kudos
Message 3 of 3
(3,543 Views)