Write and Read Files
In both Define mode and Run mode, files are available for write and read.
Because SD-card is slow, all the files writing and reading functions are given the highest priority. Touch is suspended temporarily and resumed once the file operation is completed. |
Procedure |
Functions |
Manage the SD-card
|
sC_beginSD checks a SD-card is available and prepares the file system
sC_closeSD closes the file system and frees the SD card
sC_findFile finds a file
sC_writeDeleteFile deletes a file
sC_getFileError gets the error number from the file system
|
Open and close files
Each file has a unique identifier, called file unique identifier.
A good idea is to have an integer variable for each file with the name of the file. |
sC_openFileWrite creates a new file for writing and opens it
sC_openFileAppend opens an existing file for adding
sC_openFileRead opens an existing file for reading
|
sC_closeFile closes the file
|
Write and read files
|
sC_writeFileValue writes an integer value to the file
sC_writeFileText writes a text to the file
sC_writeFileCRLF writes a carriage return - line feed to the file
|