05-24-2016 12:18 PM
I am currently trying to collect 10 second increments of 3 voltage tasks using DAQ assist and then save each segement to its own file using the write measurement express VI. The data collection VI collects 10 seconds of data, filters them and outputs them through charts. When I try to save them however, it saves the previous trials data to the end of the new file. I have tried clearing chart and graph data and tried the "save to series of files" option but nothing is working.
In summary:
Collecting Data through DAQ data assist
Each collection takes 10 seconds of data
Each save should only have 10 seconds of data
Currently saving new data along with old
LabVIEW Version 13.0.1
Solved! Go to Solution.
05-24-2016 12:52 PM
On the Write Measurement File, there is an input called "Reset" set that to TRUE. With your current settings, that will rename the file and give you a new file for the current data.
05-24-2016 01:53 PM
Unfortunately, after adding the true constant wired to the write to file express VI, when I run a second trial, the file saved still has the new data appended to the old one.
05-25-2016 08:59 AM
The detailed help page for the Write Measurement to File VI says that it ignores the reset wire on its first call. Is it possible that I have it set up where it thinks its on its first call when it isn't so it never resets?
05-25-2016 01:46 PM
The problem isn't saving new files, it is with the data collected. Each time it runs, it adds data to the wire. Is there a way where I can clear the data from the wire after the loop stops?
Attached is an image of the collection VI as well as the DAQ settings. Also attached is the VI itself.
Again, a summary:
I am trying to collect ten seconds of data and then save each segement to a file.
New data is appended onto old when and I cannot figure out how to fix this.
05-25-2016 10:25 PM
I don't see any code writing to a measurement file.
You talk about "adds data to the wire". Are your referring to those "Collector" Express VI's? They are doing exaclty what they are supposed to. If you want to clear the data out of them, then wire a True boolean to the Reset input.
05-26-2016 12:08 PM
Sorry, the writing to measurement occurs in the upper level VI which was part of the zipped folder I attached in my first post (newer version attached here). The collectors are used so I can gather the whole 10 seconds of data at once to send out of the subVI. If I wire a true constant to the collector, I only get one sample to send out at the end. If I use the first call? function, it still keeps the old data from the previous trial.
05-26-2016 12:26 PM
I've figured it out! Finally. I created my own "first call" case diagram so it returns true the first time the loop is run, resetting the collector VIs and returns false until the loop is started again. Thank you guys for your ideas