LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change frequency on .txt file

Solved!
Go to solution

Hi all,

 

I have a question regarding saving text files. I am using LabVIEW to automate a test rig and furnace which is used to run cyclic tests with up to 500 cycles at 1 hour each. I am reading and displaying temperatures on my user interface in real rime (which was part of the spec for the interface) however I would also like to save my readings in a .txt file.  I have been using the 'write to measurement file' function.

Now my problem is that at the moment I am saving a lot of readings and my file size becomes very large very fast. I have tried a 1 second wait function in my while loop but this would still give me 1.8 million readings after 500 hours. The wait function also slows down the rest of my code and the real time readout which is a bit annoying (especially if I want to get it down to saving a reading every 30 seconds or so).

 

Is there any way I can change the frequency of intervals at which I save temperature readings without slowing down my real time readout?

 

Regards,

Daniel

0 Kudos
Message 1 of 3
(2,281 Views)
Solution
Accepted by topic author Daniel K 12

Use the Elapsed Time VI. If a certain amount of time has elapsed, log.

 

Of course, this will simply change the issue from when to log to how much to log (i.e., the size of the log files). If the rig runs for a long time the log file is simply going to get larger and larger. You will likely need to check the size when you try to log, and if it's larger than some number (your choice, or set via a configuration file), you start a new one.

0 Kudos
Message 2 of 3
(2,266 Views)

Great, this worked a treat! Linked the time elapsed signal to enable signal on write to measurement file VI. Now logging temperatures every 20 seconds instead of 5 times per second as before.

 

Thanks,

Daniel

0 Kudos
Message 3 of 3
(2,256 Views)