03-26-2010 01:36 PM - edited 03-26-2010 01:36 PM
I am working with a custom VI that I made that writes a 2D spreadsheet to a file during a measurement. The 2D data may later be appended, or optionally (at the start) the file may be created for this purpose (with a header file).
However, during a recent measurement, someone tripped over the power cable for the computer and all data (representing about 15 minutes of sensitive measurements) was lost since it was not flushed to disk.
The flush VI needs a refnum input. I want to place this VI just before the return of the call, so that this does not happen again (say - the computer crashes, or if I need to abort the measurement because some of the parameters went out of range, but do not want to lose the data already acquired).
So, how do I generate a refnum from a file path. If it matters, I am using Labview 8.6 on a Fedora 10 machine.
03-26-2010 01:48 PM
Please post an image of your code so we can help out.
I suspect you are using an Express VI and it will have to be converted to real code so you can drop the flush inside it. Just opening another ref to the same file and flushing on that ref will not guarrentee the buffers asscosated with the other ref gets flushed.
Ben
03-26-2010 02:52 PM
Would Flush VI really help with this?
Are you sure the data was written? I wouldn't think that Windows or any operating system would hold on to data to be written to a file for as long as 15 mintues.