LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Append to end of text file

Hi all,

 

I have a program that writes input data into a text file. Every time I write to the text file, it shows the Time and Date. However, I only want the Time and Date in my text file to show only once and the input data to be appended continously to the end of the text file.

 

Can someone point me in the right direction as to how to do it?

 

P.S. I'm using LabVIEW 2012

 

0 Kudos
Message 1 of 2
(2,698 Views)

Why are you opening and closing the file inside your loop? Open it once outside your loop, close it once when the loop finishes. Also, before the loop starts (i.e. outside the loop right after you open the file) write the date and time, then leave it out of your records inside the loop.

 

Furthermore, I believe the only reason you need to keep setting the file pointer to "end" is because you keep opening and closing the file. Just leave the file open and the file pointer will more as you write; no need to set it before every single file write.

0 Kudos
Message 2 of 2
(2,693 Views)