12-20-2019 10:47 PM
Can someone please help me? I am trying to delete a channel named "Mod2a15" from the TDMS file. The VI was working meaning I was able to delete channels, but it stopped working suddenly and I did not modify anything at all. Can someone please help me? The screenshot below is how my block diagram looks like. Also, I attached my VI and a TDMS file where I am getting that channel (Mod2a15) from.
Thank you for your help.
Solved! Go to Solution.
12-21-2019 07:21 AM
You say "it stopped working suddenly" - what do you mean?
It doesn't delete the channel anymore? Or some error occurs?
Do you see an error, and if so, which VI causes it?
Probing the error wires will give you an answer to this.
When I run the VI you attached with the same data, I don't see anything particularly problematic. If I set the "keep empty group/channel?" to false, then the channel disappears. Otherwise it is empty after running.
12-21-2019 08:15 AM
You started with the working LabVIEW Example "TDMS Delete Data From Channels" and simplified it to suit your particular needs (that's good, start with "what works"). However, the code you posted seems strangely incomplete -- it ends with a TDMS "Create", which will effectively delete the original TDMS file that you worked so hard to delete some data, and then abruptly stops, no Error output, no nothing.
Go back and study the Example. Be sure you understand all of the steps. If you have any questions about any of the LabVIEW Functions, right-click it, choose "Help", and read the Detailed Help for the function.
Bob Schor
12-21-2019 08:31 AM
@Bob_Schor wrote:
You started with the working LabVIEW Example "TDMS Delete Data From Channels" and simplified it to suit your particular needs (that's good, start with "what works"). However, the code you posted seems strangely incomplete -- it ends with a TDMS "Create", which will effectively delete the original TDMS file that you worked so hard to delete some data, and then abruptly stops, no Error output, no nothing.
I *think* (based on my previous running of the file, and then some quick testing just now) that the behaviour of TDMS Open with "Create" as the behaviour and an existing file, is to throw error 6, "generic file I/O error", and do nothing with the file. So as you point out, not checking the error hides a problem, and opening a file with "create" and then doing nothing seems like an unusual (/unwise?) course of action, but it won't actually delete the file.
12-21-2019 01:40 PM
Thank you, Cbutcher. Yes, changing "keep empty group/channel?" to false did the job. I have another question, but I will open another thread.