Thank you so much for your help in advance.
It may be just a function of your operating system. I believe Windows has some settings that will buffer up writes to a file until the OS feels it is an appropriate time to write them out.
Why would you be using the the abort button to stop your VI? How instantaneously do you actually need the data written to the file?
You could try using the Flush File function in the Advanced File I/O palette to force the data to be written to the file.
Nevermind. Sorry wrong idea.
You are continuously opening and closing the reference.txt file at several places in your loop, and it happens on each loop iteration. No need for this. Open it once, before the main loop. Wire the refnum out to each place you read or write. Then wire the refnum to the right border of the main loop and close the file after the loop. All of these open-read-close, open-write-close all over the place is probably wreaking havoc with the operating system.
"You could try using the Flush File function in the Advanced File I/O palette to force the data to be written to the file."
how to use the Flush File function .
how to use the Flush File function.
Try looking for it in the LabVIEW Help. It is pretty self explanatory.