LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I add data to a file without over writing?

Hello,
 
 
My  program writes data into a file. However, I would like to be able to write this data in a file where data is already strored. Could anybody tell me how to do this ( write data into a file after the last line of the same file without over-writing) ?
 
Any help would be great,
 
Thanks,
 
David
0 Kudos
Message 1 of 7
(2,516 Views)
When writing to file, you can use the append? boolean set to true.  This will append data to the end on the selected file.
 
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 2 of 7
(2,509 Views)
See attached picture:
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 3 of 7
(2,507 Views)
Oops the append Boolean should be true in the previous post.
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 4 of 7
(2,506 Views)
Thanks for ur answer falk, It now works fine.

I was using the icons Open + Write + Close.. before using ur solution. Actually I was opening only once the file and then saving my data to that file and then closing it at the end of the program only. Whereas with ur solution, it seems that the icon adds the data fine to the file by then closes it just after. I am saving the data every second at the moment.... is opening and closing the file each time I write the data a problem in my program?

Thanks a lot for ur help,

Regards,

David

0 Kudos
Message 5 of 7
(2,486 Views)

Glad to help.  Good luck with the coding

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 6 of 7
(2,467 Views)
Opening and closing each time is not a problem, but it will slow your program down.  Leave the file open and just write each time.  Do the close before you exit.
Message 7 of 7
(2,459 Views)