LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Accumulation of Data

Hello everyone

I am trying to write a new file every day but what is happening is that every new file has the new data as well as the previous day's data. How do I stop that?

0 Kudos
Message 1 of 4
(2,546 Views)

hard to tell from a picture that is missing half.

please clean up your vi (no stuff over things, no wires going backwards,...) and attach it.

 

regards


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 2 of 4
(2,520 Views)

Make sure you empty the Data array after you've written it to file.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 4
(2,515 Views)

To begin with you are going to need a proper program architecture, not one big loop. 

 

  1. Note what day it is
  2. Open your data file
  3. Everytime you write to the data file check what day it is now
  4. IF the day is is now is not equal to the day it was when you opened the data file
    1. Close the data file
    2. Note what day it is now
    3. Open a new data file
  5. Write your data

 Sounds complicated but if you were using a proper architecture like a state machine this is trivial to add. 

 

See my post in this thread https://forums.ni.com/t5/LabVIEW/Automatic-save-and-create-new-file-everyday/m-p/3608974 for an example of what I am saying.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 4
(2,501 Views)