LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Set a autocounter for file saving

Hi
 
I was wondering if antbody knows of any quick tricks for autosaving files with a look-up to prevent overwriting.
 
What I would like to do is set the file path and for the labview routine to look in that path for the last file name and add 1 to the file name so the last file is not overwritten.
 
e.g.  path:                C:\Ashley:\todays_runs
        start counter:  001
0 Kudos
Message 1 of 3
(2,679 Views)
You might find the attached picture to be useful.  I simply had a "unique" identifier that saved the data in a tickcount element.  Unique is in quotes because it will only go from (2ˆ32)1 to 0 (wrapping time).  If this does not work for you, you might want to use a "Get Date/Time in seconds" function to get a more unique identifier.
0 Kudos
Message 2 of 3
(2,668 Views)
Here is a quick vi that will return the highest file name. This will work if the file names are numbers only. eg. 001.txt. The file extention doesn't matter, you can chage that.

Andrew Alford
Elec. Tech.
Andrew Alford
Production Test Engineering Technologist
Sustainable Energy Technologies
www.sustainableenergy.com
0 Kudos
Message 3 of 3
(2,663 Views)