From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS file only closes when program ends?

Solved!
Go to solution

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.

 

TrueTrueFalseFalse

0 Kudos
Message 1 of 3
(2,543 Views)

It will close whenever you call the TDMS Close.  When you do that is completely up to you.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(2,523 Views)
Solution
Accepted by topic author sjacksonPA

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.

Message 3 of 3
(2,469 Views)