LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write tdms file with a fixed size

Solved!
Go to solution

Hi guys, I am stuck by the problem of how to write a series of tdms files with each file has a fixed size from continuous analog sound recordings. Each file is named by the time stamps. The solution that I am trying at this moment is to create a new tdms file every a few seconds (the condition) using the tdms open function. This idea involves a case structure to judge the condition. When it is true, the new file name is created and then the tdm open function is called. When it is not true, I'd like to use the file name earlier created. However, I don't know how to access to the file name that is created earlier, and thus I am not able to wire the false conditon of the case structure. Any help would be appreciated.

0 Kudos
Message 1 of 7
(3,361 Views)

"When it is not true, I'd like to use the file name earlier created. "

No, do not use the earlier file name, but the TDMS File reference. Store it in a shift register, and rewrite it with the new TDMS File ref when a new file is created.

Try to create a simple small VI for testing, and upload it here so we can have a look where you got stuck...

0 Kudos
Message 2 of 7
(3,358 Views)

Dear Blokk, thanks for your fast reply.

I cut the part out of my program (attached). This moment it is not working, as the false condition for the case structure is not wired. 

You mentioned to use the shift rigister for my application, but I could not figure out how to use it exactly. Could you please explain me in more detail? I am very new to Labview, and actually this is my first program to build. Thanks a lot!

 

0 Kudos
Message 3 of 7
(3,344 Views)

I cannot open your VI, downconvert it into version 14.

0 Kudos
Message 4 of 7
(3,341 Views)

Sorry. Vonverted to verstion 14. Please have a look.

0 Kudos
Message 5 of 7
(3,336 Views)
Solution
Accepted by topic author luojh135

Here is a snippet to play with it:

 

TDMS_test1_BD.png

 

TDMS_test1_BD_.png

0 Kudos
Message 6 of 7
(3,324 Views)

Dear Blokk, Thanks very much for your help. I got your idea and have replicated your program. You can be a very good teacher.

0 Kudos
Message 7 of 7
(3,302 Views)