TableFile Append Mode

Negating the Options parameter of TableFile activates "append mode" for all options except option 64. With append mode, the file is still closed at every interval, and a new file is created with an incremented number in the same manner as other TableFile options. The difference between append mode and normal TableFile operation is that with append mode, new records are immediately appended to the table as they occur, rather than being 'baled' at the next interval. Hence, with append mode, the Outstat variable is true each time a new record is written to the table, rather than only when the TableFile interval or number of records is reached.

A major advantage of append mode is that in the event of a power failure, or any event that causes a TableFile interval to be missed, the card still contains the last data written to the table in the user-desired format.  However, writing data to a card with append mode is less efficient than writing all of the data at once when an interval is reached. Also, append mode increases card wear due to continually updating the FAT and files are more vulnerable to corruption. For these reasons, append mode is intended only for TableFile intervals greater than 5 minutes.  A common application for append mode is with stations that send data over FTP or HTTPS to a central data repository. In this case, the memory cards are used as a safegaurd or backup of data, rather than the primary data storage device. 

Append mode is not relevant for option 64 because in this case, the internal datalogger memory is used as a buffer to transfer data to the card. When there are enough data (~ 1Kb) to warrant a write to the card, then data are flushed to the card (same operation as CardOut). TableFile with option 64 is recommended for TableFile intervals shorter than 5 minutes.