Mitsubishi Electric MELSEC iQ-R Series Programming Manual page 625

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

■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.
• 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.
• 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.
Ex.
The number of columns is set to 0 when writing data after conversion to the CSV format.
SP.FWRITE
D10
0100H
D11
-
D12
K0
D13
-
K0
D14
D15
K0
K0
D16
D17
K0
D99
K7
D100
K0
D101
K10
D102
K20
D103
K30
D104
K40
D105
K-50
D106
K100
Data to be written to the file
, 10
,
0
Data written to Excel
(1) Specified in units of words
(2) Same as the number of write data if case of normal completion
U0
K2
D10
"ABCDE" D99 M0
Execution/completion type
Completion status
Number of data written
Not used
File position
Number of columns
Data type
Number of write-target data
Write data
,
,
,
,
20
30
40
-50
100
(1)
(2)
CR LF
7 APPLICATION INSTRUCTIONS
7.6 Reading/Writing Data Instructions
7
623

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents