07-31-2007 03:39 AM
07-31-2007 06:42 AM
hi there
if you are using the file IO functions try the "flush file" function. This funtion forces the OS to write the data to the medium (at least at high level OSes, i don't know about NI-RT, but i'd try it) if this function does not work try to close and reopen the file every few seconds, this also should force the OS to write the data to the medium.
07-31-2007 11:43 AM
08-01-2007 04:05 AM
Chris,
Thanks for the comments. I'm not sure if I explained myself very well.
What I am concerned about is what happens to the data file if the power to the system fails during a file write. I am intending to append data to the end of a log file every few seconds, to co-encide with GPS information. I am not too worried about loosing the current data, but I am concerned about what happens to the existing data in the file.
Regards,
Tom
08-01-2007 04:14 AM
to make sure that you don't loose data the data has to be written to the medium PHYSICALLY (not only virtually). this can be done by flushing the file or by a close/reopen-operation.
it's about 10 years ago since i saw the last (LV written data-)file that was corrupted due to a system breakdown during a write operation. the worst case scenario would then be the loss of all data since the last flush or close/reopen.