09-29-2005 09:36 AM - edited 09-29-2005 09:36 AM
Message Edited by Broken Arrow on 09-29-2005 09:37 AM
09-29-2005 10:43 AM
09-29-2005 12:54 PM
09-29-2005 01:00 PM
Blog for (mostly LabVIEW) programmers: Tips And Tricks
09-29-2005 01:02 PM
09-29-2005 01:04 PM
Blog for (mostly LabVIEW) programmers: Tips And Tricks
09-29-2005 01:07 PM
Blog for (mostly LabVIEW) programmers: Tips And Tricks
09-29-2005 01:10 PM
09-29-2005 01:12 PM
09-29-2005 01:13 PM
I think the problem is that you open multiple file references to the same file, but close only one.
The "write characters to file" Opens the file with a new reference at each call and closes it again after writing. You should open the file once and keep it open, it would be more efficient.
For the option "Start New File", you open a new reference that you never close anywhere!
In the unload option, you again open a new refnum, and close it immediately. This servers no purpose. It does not close the reference opened by the "NEW" node, just the one it created a nanosecond earlier. 😉
Try to place a close right after the NEW for a dirty patch of the problem.
For a better solution, open or create the file once and then keep the file reference in a shift register. Write using low level VIs without ever closing the file, except when unloading.