EasyManua.ls Logo

Panasonic GM1 - Page 585

Panasonic GM1
650 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
2. Example of file write processing
SampleDir/SampleFile.txt is created in the SD card and specified data is written to the file.
File write processing sequence
The file write processing sequence is shown below
.
File open processing (overwrite mode, insert mode)
Overwrite mode: For existing files, the contents of the file are cleared.
Insert mode: For existing files, the contents of the file are not cleared.
When write is executed, data is written following the end of the previous data.
File write processing
File close processing
Explanation of variables
uiProcess:
Executes processing when file open processing is set to 1 (overwrite mode) or 2 (insert
mode). After the execution is completed, the variable is set to 0 (invalid value).
sFileName:
Specifies a directory or file name.
sWriteData:
Sets data to be written.
bResult:
Substitutes the result of processing execution. (TRUE: Error occurrence, FALSE: Normal
termination)
If the result of processing execution is abnormal, check the error code of each processing.
eOpenResult: Result of file open processing
eWriteResult: Result of file write processing
eCloseResult: Result of file close processing
Operation example
In this example, operations are performed by setting the value of uiProcess to 1, 2, and 2 in
this order.
The contents of SampleFile.txt which is output are as follows:
NEW_DATA
ADD_DATA1
ADD_DATA2
Sample program
14.1 SD Card Access
WUME-GM1RTXOP-01 14-3

Table of Contents

Related product manuals