Panasonic GM1 User Manual page 585

Motion controller controller rtex
Hide thumbs Also See for GM1:
Table of Contents

Advertisement

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
WUME-GM1RTXOP-01
14.1 SD Card Access
14-3

Advertisement

Table of Contents
loading

This manual is also suitable for:

Gm1 series

Table of Contents