7 APPLICATION INSTRUCTIONS
7.6 Reading/Writing Data Instructions
623
7
■Converting and writing data in CSV format
• If the extension is omitted, the extension will be ".CSV".
• When an existing file is specified, the following occurs.
• If a file that does not exist is specified, it will be created and data will be saved to the beginning of the file. The newly
created file has the archive attribute.
• If the media runs out of free space during additional saving of data, an error occurs. In this case, the data already added
and saved successfully is held as is and as much remaining data as possible is added and saved before termination with
an error.
• When the number of columns is set to 0, data is read as a single-row data in a CSV format file.
The number of columns is set to 0 when writing data after conversion to the CSV format.
• When a value other than FFFFFFFFH is specified in (d1)+4 or (d1)+5, data is saved to the file after deleting the existing data in the file.
• When a value other than FFFFFFFFH is specified in (d1)+4 or (d1)+5, data is added and saved to the end of the file.
(1) Specified in units of words
(2) Same as the number of write data if case of normal completion
0100HD10
SP.FWRITE D10K2U0 "ABCDE" D99
M0
D11
D12
D13
D14
D15
D16
D17
D99
D100
D101
D102
D103
D104
D105
D106
-
K0
K0
K0
K0
K0
K7
K0
K10
K20
K30
K40
K-50
K100
0
,
10 20 4030
,,
-50 100
,, ,
CR
LF
-
(2)
(1)
Execution/completion type
Completion status
Number of data written
Number of columns
Data type
Number of write-target data
Write data
Data written to Excel
Data to be written to the file
Not used
File position