8.3 Writing Data to Specified File
8-13
8
QCPU
INS
T
R
UCTIONS
SP
_FWRITE
SP_FWRITE
(3) Be sure to use units of word to specify the number of request write data (
), and the file
position [4]
and [5].
The following shows the method for writing binary data when number of request write data
and file position are specified.
(4) When writing binary data
(a) If the extension of the target file is omitted, ".BIN" is used as an extension.
(b) When the specified file does not exist, a new file is created and the data are additionally
saved from the beginning of the file.
The attributes of this new file are set using the archive attributes.
(c) When the size of the data exceeds that of the existing area in the file during the writing,
the excess data are additionally saved.
(d) If the file position specified is greater than the existing file size:
• The High Performance model QCPU of which the first 5 digits of the serial number
are '01111' or lower results in an error.
• The High Performance model QCPU and Universal model QCPU of which the first 5
digits of the serial number are "01112" or higher performs writing at point 0 and is
completed normally.
(e) An error occurs when the saving space becomes full while data are additionally saved.
In such a case, the data that are additionally saved successfully remains in the medium.
The error completion is indicated after additionally saving the data as much as possible.
(5) When writing data after CSV format conversion
(a) If the extension is omitted, ".CSV" is used as an extension.
(b) When the existing file is specified:
[High Performance model QCPU of which the first 5 digits of the serial number are
'01111' or lower]
File contents are all deleted and data are saved from the beginning of the file.
[High Performance model QCPU and Universal model QCPU of which the first 5 digits
of the serial number are '01112' or higher]
• When other than FFFFFFFF
H
is set at (
[4],
[5]), file contents are all deleted and
data are saved from the beginning of the file.
• When FFFFFFFF
H
is set at (
[4],
[5]), data are saved from the end of the file.
s
2
d0
d0
S
tart
pos
i
t
i
on
of
the
f
il
e
to
b
e
w
r
i
tten
E
xecut
i
on
/
comp
l
et
i
on
t
y
pe
(N
ot
use
d)
N
um
b
er
of
w
r
i
tten
resu
l
t
d
ata
(N
ot
use
d)
S
pec
i
f
i
cat
i
on
of
the
num
b
er
of
co
l
umns
Data
t
y
pe
spec
i
f
i
cat
i
on
Fil
e
d
ata
(i
n
by
te
un
i
ts
)
O
ne
w
or
d
sh
i
ft
Data
d
ev
i
ce
Data
to
b
e
w
r
i
tten
T
ota
l
C
ontro
l d
ata
0000
H
-
K3
K1
-
K0
-
00
H
+0
00
H
22
H
33
H
44
H
55
H
66
H
77
H
00
H
00
H
00
H
+1
+2
+3
K3
33
H
22
55
H
44
77
H
66
[0]
d0
[1]
d0
[2]
d0
[3]
d0
[4]
d0
[5]
d0
[6]
d0
[7]
d0
s
2
s
2
s
2
s
2
d0
d0
d0
d0
Summary of Contents for MELSEC Q Series
Page 1: ...Structured Programming Manual Mitsubishi Programmable Controller QCPU Common Instructions ...
Page 2: ......
Page 14: ...A 12 MEMO ...
Page 340: ...6 178 MEMO MTR ...
Page 708: ...7 368 MEMO ...
Page 776: ...8 68 MEMO ...
Page 796: ...9 20 MEMO ...
Page 804: ...App 8 MEMO ...
Page 812: ...Index 8 MEMO ...
Page 815: ......