LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write to text file; not overwriting old, but moving to next entry and writing

I am interested in writing a series of filenames, to a text file, so I can keep track of sample ID and experiment #'s. I would like each new filename to be writtten following the previous filename, rather than always overwriting. I've done a brief check of some of the properties, and couldn't find anything. Any ideas? thanks
0 Kudos
Message 1 of 4
(4,834 Views)
You are a beginner😉 Here is a tip. In the help option (toolbar) always enable Show context help. If you are unsure about functions just use mouse and point on the function. The next tip is the Example finder. This is a treasure chest for learning Labview by examples


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 2 of 4
(4,824 Views)

Something like that?

 

samples.png

 

Andrey.

0 Kudos
Message 3 of 4
(4,823 Views)

Hey csmrunman,

 Just to clarify, are you looking to append text to an existing file without over-writing existing text, or are you looking to create a series of text files with unique names?  If you want to append text to an existing file, then Andrey's solution above should be what you need.  If you want to programmatically determine a unique name for the text files, then you can use a similar means to deterine a unique name (Andrey used the iteration terminal above so that each iteration of the while loop produces a unique text to be inserted into the text file).  You mentioned the use of sample ID and experiment number, which you could also use as a file name if you wish to, and even have the user of the VI enter the information that makes up the filename through front panel controls.  The string functions (in the Functions Palette under Programming » String) will be of great use here.  Of course, if you are just looking for an “out-of-the-box” solution, there is always the Write to Measurement File Express VI (Programming » File I/O), but this is best suited for situations where you have channels of data that you would like to store, so this may not fit depending on the data you wish to store.  If it does fit, however, there are settings that you can configure for saving to a series of files:


 

Untitled.jpg

 

 

Message Edited by Chris_G. on 09-28-2009 11:50 AM
Chris_G
Sr Test Engineer
Medtronic, Inc.
0 Kudos
Message 4 of 4
(4,775 Views)