08-21-2008 02:34 PM
08-22-2008 01:49 PM
Hi Gizmaa,
It is possible that the problem you are seeing is due to not closing the file that you are writing depending on how data is being written to the flash card. Try including a file close VI in your program and see if that fixes the problem. It is good practice to include a file close VI after the loop with read or write VIs so that multiple files are not continually opened and problems like yours are avoided.
Regards,
Stephen S.
08-22-2008 02:47 PM
Is there a write method that is more fault tolerant? If my datalogger goes down for any reason I don't want hours/days of data lots.
08-25-2008 05:58 AM
Hi there,
If I was programming this, I would do a daily or weekly file (Brand new from scratch). This would lower the risk of corruption in case of a crash, and make it more easy to get back the data.
For the Closure of the file, I would program a small routine that would close the file every day/hours/minutes and reopen it at the next itteration with the append to file option turned on.(you can do this with a case structure that would be on at regular intervals) This would limit the number of time costly file access, and still close the dfile on a regular basis (allowing an easier recovery) .
The problem if you use a simple write to file function is that it will open write and close a file at every call (this is starving the processor), but if you do it once in a while, it doesn't hurt too much....
I hope this helps
Matthieu