Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

Delete created TDMS file

Hi,

I have a question. In my VI I creat a TDMS file with measured values. After that I add these values to another TDMS file. I choosed this way because the others are to difficult. Anyway at the end of the VI I want to delete this created TDMS file because the values are in the other file and therefore I don't need the old file anymore. I can delete it outside Labview but I want to do this automatically. In other words I created a TDMS file in the beginning of the VI and want to delete it in the end. Is that possible?

Thank you for your help

Regards

0 Kudos
Message 1 of 7
(5,302 Views)

Hello DanielDerer

 

the delete function can be found under FileI/PO -> Adv File Functions -> Delete

 

Delete.png

 

Additional you have to delete the TDMS and the TDMS index file.

 

Hope it helps, if not please let me know

best regards
Alexander
0 Kudos
Message 2 of 7
(5,273 Views)

Hello Alexander Glasner,

I already found this function and placed it at the end of my VI. I tried it several ways but nothing was succesful. It's in the same run as the TDMS file was created and because of this there always occurs an error: "File already open".

Thank You

Regards

0 Kudos
Message 3 of 7
(5,266 Views)

Hello DanielDerer,

 

have you closed the TDMS file before?

 

Can you post the code?

best regards
Alexander
0 Kudos
Message 4 of 7
(5,264 Views)

Hello Alexander Glasner,

no I didn't close the TDMS file, I also tried this but there is still the error.

This is an extract from my VI, the code before isn't important.

With the Express VI "Read from measurement file2" I copy the channels from the file 2 into file and at the end of the outer while loop I want to delete the file2.

Thank You

Regards

Unbenannt2.png

0 Kudos
Message 5 of 7
(5,258 Views)

Hello DanielDerer,

 

if you open the configuration of the ExpressVI you see that the file will be locked per default. You can convert the Express Vi to an SubVI to change the the lock setting.

 

Then it is possible to delete the files.

 

Hope it helps.

 

best regards
Alexander
Download All
0 Kudos
Message 6 of 7
(5,231 Views)

Hello Alexander Glasner,

thank you very much for your help. You already helped me with your first sentence. I didn't know that the file format is automatically safed with a lock. I tried to disable this lock. With the TDM file format you can disable this and still can create a TDMS format. I just disabled this lock and deleted the TDMS and the index file and it was successful.

Nevertheless I took a look at your files you sent me. They are very interesting. I didn't know about these kinds of subVIs. I will keep them in mind.

Thank you very much for your efforts

If I have another question, i will ask here 🙂

Regards

0 Kudos
Message 7 of 7
(5,223 Views)