LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Low to append a text file in LV2009?

I’m trying to write to a text file.  I’m attaching 2 vi’s.  test1.vi only record the latest data and test 2 records all the data.  They are very similar in coding, why test1.vi does not work?
Additionally, I would like to append to the file if it exists (add new rows to it).  If not, I would like it to create a new one.  How would I do it?
Thanks.

Download All
0 Kudos
Message 1 of 4
(2,646 Views)
Test2, you open the reference to the file outside the loop, so it is called only one time. Test1 opens the reference each iteration. This causes the data to be overwritten. Move the open file outside of the loop and it should work the same.
0 Kudos
Message 2 of 4
(2,638 Views)

Thanks for point that out, but the open file command only executes once in Test1 isn't?

 

0 Kudos
Message 3 of 4
(2,628 Views)
Read the help for the Write Funtion to see what happens when you wire a path and not a reference to it.
0 Kudos
Message 4 of 4
(2,616 Views)