LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tdms

Hi, I am adquiring data from a proccess in real time, I want to create TDMS files every five minuts, my problem is how rename the file every iteration and if it is possible to do with a while loop.

 

0 Kudos
Message 1 of 7
(2,560 Views)

Hi Leon27,

 

Do you have the VI code? What is the name of the files you want to recreate?

 

Presuming that you want to programmatically create a new file for every 15 mins, it is possible. You'll need to use a combination of shift registers (to hold previous values), while loop, case structure (if else conditions) and a timer to trigger the condition. 

 

You can find the example here: https://decibel.ni.com/content/docs/DOC-22640

 

Warmest regards,

Lennard.C

 

 

Learning new things everyday...
Message 2 of 7
(2,524 Views)

Hi, Lennard.

 

I am sending you an image from my VI´s code. Yesterday I could achieve to create a file every 5000 samples, but the file is overwriting every iteration, I will review the information you sent me.

 

Thanks.

 

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

You should use the GetDateTime VI in conjunction with FormatDateTimeString to build unique file names

 

the format string %Y%m%d%H%M%S gives a one second resolution which should be good enough

don't forget the open/close file handling

Message 4 of 7
(2,486 Views)

Leon27 wrote: but the file is overwriting every iteration

That is because you never change the file name.  As was stated earlier, using the Date/Time to build an unique file name is a good route to go.  The other option is to put the loop index number in the file name.


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
Message 5 of 7
(2,475 Views)

Hi, Lennard.

 

With base on your code I could resolve my problem.

 

thanks.

 

 

0 Kudos
Message 6 of 7
(2,467 Views)

Crossrulz and  Christian_w,

thanks for your opinion, now I am trying to prove your comments.

0 Kudos
Message 7 of 7
(2,465 Views)