01-31-2020 11:34 AM - edited 01-31-2020 12:32 PM
my program only writes one line in the csv file for some reason. Bummer.
01-31-2020 09:35 PM
So after a little automatic tidying (Block Diagram cleanup, there's a "broom" icon, or you can use Ctrl+U) and then some manual rearrangement, I found this bit:
The key point here is that every time you open a file, the location that you start at is the beginning of the file.
Assuming that you want to append data, using your current code you'd need to add Set File Position between your Open and your Write, and set the position to "End"
Some description of your problem can be found here: Append to a Text or Binary File in LabVIEW.
The more common solution is to open your file before the loop, place the reference in a Shift Register (using Set File Position between open and the SR if opening an existing file), and then keep the reference open until you finish.
You then close the reference on the right hand side of the loop, via the outgoing shift register. At the moment, you're not closing your file reference, which is leaking memory (not much, but it will).
Here's an example: