01-15-2019 05:25 PM
Hi all,
We have a small program that records data and save it to a new name every itinerary when it's in the saving mode. We create, save and close tdms file but we found that the files can not be deleted even when the program is in idle mode, which means the logging of data is finished and tdms file closed (should be? no?). I have the saving part of the program attached in the picture. I think the author used a "write to measurement file" express VI to prompt user to give a file name to save, then used another one to increase the suffix of the name (which may be the easiest way to do?) lol But, is it causing any of the non-closing problems? And we seem to have blue screen problems sometimes when using the program, which may be related to the saving process? Do you have any suggestions? Thank you very much for your help!
01-15-2019 05:26 PM
Here's the picture...
01-15-2019 09:16 PM
Where does the file path wire go to when it goes off the right side of your image?
Can you do some wire clean up on that file path? Something odd is going on the way it enters and leaves the Express VI, like the Express VI is covering up part of it. It is odd that you have two of those before going to the Open TDMS file function.
01-16-2019 09:56 AM
Hi dienosong,
Can you attach the VI so that we can tinker with it a bit? It will be hard to offer concrete suggestions without running the code ourselves.
I echo RavensFan's sentiment that calling Write to Measurement File.vi twice for purposes other than writing to a measurement file is certainly overkill and may be causing the weird behavior you are experiencing. If you just need to get user input, then I would recommend using Prompt User for Input.vi. It is also an Express VI and should be very easy to use.
As a disclaimer, LabVIEW may not be immediately releasing the file for use by other processes when you call TDMS Close. The compiler can sometimes make its own decisions about managing system resources for optimization purposes. Is there a reason that you need to be able to delete the tdms file during program execution?
Best,
Duncan Waldrop
Applications Engineer
National Instruments
11-11-2020 03:44 PM
I'm having this exact same issue in LabVIEW 2015. It's a very simple VI that saves the data off a Waveform graph when the user pushes a button. I can't delete a TDMS file that was created using this VI until I stop the top level VI.