
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
Summary of Contents for GM1 Series
Page 1: ...Motion Controller GM1 Controller RTEX User s Manual Operation WUME GM1RTXOP 01 2021 2 ...
Page 2: ... MEMO 2 WUME GM1RTXOP 01 ...
Page 6: ... MEMO vi WUME GM1RTXOP 01 ...
Page 16: ... MEMO xvi WUME GM1RTXOP 01 ...
Page 20: ...1 3 Software License Agreement 1 3 Software License Agreement 1 4 WUME GM1RTXOP 01 ...
Page 21: ...1 3 Software License Agreement WUME GM1RTXOP 01 1 5 ...
Page 22: ...1 3 Software License Agreement 1 6 WUME GM1RTXOP 01 ...
Page 28: ... MEMO 2 6 WUME GM1RTXOP 01 ...
Page 66: ... MEMO 3 38 WUME GM1RTXOP 01 ...
Page 76: ...4 6 Project Configuration 4 6 Project Configuration 4 10 WUME GM1RTXOP 01 ...
Page 102: ... MEMO 4 36 WUME GM1RTXOP 01 ...
Page 231: ...The POU object of the program will be added to the task 7 9 Tasks WUME GM1RTXOP 01 7 65 ...
Page 240: ...8 2 Connecting the GM1 Controller and PC 8 4 WUME GM1RTXOP 01 ...
Page 270: ... MEMO 8 34 WUME GM1RTXOP 01 ...
Page 287: ...9 4 Monitoring Function WUME GM1RTXOP 01 9 17 ...
Page 299: ...9 7 Device Trace Function WUME GM1RTXOP 01 9 29 ...
Page 300: ...9 7 Device Trace Function 9 30 WUME GM1RTXOP 01 ...
Page 314: ... MEMO 9 44 WUME GM1RTXOP 01 ...
Page 362: ... MEMO 10 48 WUME GM1RTXOP 01 ...
Page 372: ...When Modulo is selected 11 1 RTEX Axis Setting 11 10 WUME GM1RTXOP 01 ...
Page 394: ...11 3 Single axis Operation 11 32 WUME GM1RTXOP 01 ...
Page 397: ...ST program 11 3 Single axis Operation WUME GM1RTXOP 01 11 35 ...
Page 399: ...ST program 11 3 Single axis Operation WUME GM1RTXOP 01 11 37 ...
Page 407: ...11 4 Synchronous Operation WUME GM1RTXOP 01 11 45 ...
Page 418: ... Preinterpolation tab 11 5 Multi axis Operation 11 56 WUME GM1RTXOP 01 ...
Page 419: ... Table editor tab 11 5 Multi axis Operation WUME GM1RTXOP 01 11 57 ...
Page 421: ... Common tab Build tab 11 5 Multi axis Operation WUME GM1RTXOP 01 11 59 ...
Page 422: ... Access Control tab 11 5 Multi axis Operation 11 60 WUME GM1RTXOP 01 ...
Page 462: ... MEMO 11 100 WUME GM1RTXOP 01 ...
Page 479: ...ST program 12 5 PWM Output WUME GM1RTXOP 01 12 17 ...
Page 526: ... MEMO 12 64 WUME GM1RTXOP 01 ...
Page 587: ...Implementation section ST programming language 14 1 SD Card Access WUME GM1RTXOP 01 14 5 ...
Page 588: ...Implementation section LD programming language 14 1 SD Card Access 14 6 WUME GM1RTXOP 01 ...
Page 591: ...Implementation section LD programming language 14 1 SD Card Access WUME GM1RTXOP 01 14 9 ...
Page 598: ... MEMO 14 16 WUME GM1RTXOP 01 ...
Page 646: ... MEMO App 4 WUME GM1RTXOP 01 ...
Page 648: ... MEMO WUME GM1RTXOP 01 ...
Page 649: ... MEMO WUME GM1RTXOP 01 ...
Page 650: ...Panasonic Corporation 2021 February 2021 WUME GM1RTXOP 01 ...