08-07-2017 04:29 PM - edited 08-07-2017 04:29 PM
I've looked through the TDMS resources and such, but I couldn't find the answer.
Can I close a TDMS file without stopping the program?
My program has a record button, and I need that button to control whether a new TDMS file is created or closed. Right now, my TDMS file will only close if the program is stopped. I'm guessing that it has to do with my file name perhaps, or the logic? Appreciate anyone taking a look at this. Thanks.
Here is a snapshot of my code.
Solved! Go to Solution.
08-07-2017 05:16 PM
It will close whenever you call the TDMS Close. When you do that is completely up to you.
08-08-2017 07:49 AM
I think it may be because your Create/Replace TDMS function is outside of your recording conditional, but inside the while loop. When you set "Record Data" to false, it will stop recording, but you're then re-opening/creating the file on the next loop iteration. This means you're constantly re-opening and then closing the file again when your record button is false which is why it's not "closed" until the program stops.