12.07.2015 Views

Programming Manual Elektor Proton Robot - ELEKTOR.se

Programming Manual Elektor Proton Robot - ELEKTOR.se

Programming Manual Elektor Proton Robot - ELEKTOR.se

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

OpenDescriptionOpens a file handle in one of 4 different modes described above.NoteIf a file is created, the file modification date is <strong>se</strong>t to the current time from the built-in RTC(Real Time Clock). You can change the time by using the Time command. You can modify thefile modification date using the Change Timestamp command.FormatO fh mode pathParameters• fh is a file handle (1 - 4). U<strong>se</strong> the Free Handle command to get a free file handle.• mode is one of:o ”R” – Open in read-only mode. No data can be written to the file.The filename in the path must exist.o ”W” – Open in write mode. This opens a new file for writing. The file must notalready exist.The filename in the path must NOT already exist.o ”A” – Open in append mode. This opens a new or existing file for writing. Onceopened, the file handle is positioned at the end of the file.If the filename in the path does not exist, it will be created.o ”RW” – Open in read/write mode. This opens a new or existing file for reading and/orwriting. Once opened, the file handle is positioned at the beginning of the file.If the filename in the path does not exist, it will be created.• path is the absolute path to a file/directory. A properly formatted path must begin with a ”/”(forward slash) and begins at the root directory. Subdirectories are <strong>se</strong>parated with ”/”(forward slash).o e.g. /logs/january/jan3.logRespon<strong>se</strong> FormatNULL | EnnExampleOpen a file for reading:Bart Huyskens <strong>Manual</strong> <strong>Elektor</strong> <strong>Proton</strong> V1.0 3 April 2011 134

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!