97
Instruction Functions Section 2-2
WRITE DATA
FILE
FWRIT
@FWRIT
701
Output
Required
1106
WRITE TEXT
FILE
TWRIT
@TWRIT
704
(CS/CJ-series
CPU Units with
unit version 4.0 or
later only)
Reads ASCII data from I/O memory and stores that data in the Memory
Card as a text file (writing a new file or appending a file). The data is
stored in the TXT format.
Output
Required
1113
Instruction
Mnemonic
Code
Symbol/Operand Function Location
Execution
condition
Page
FWRIT(701)
C
D1
D2
S
C: Control word
D1: 1st
destination word
D2: Filename
S: 1st source
word
File specified in D2
CPU Unit
File specified in D2
CPU Unit
Append
CPU Unit
Memory Card or EM file memory
Starting
address
specified
in S
Number of words
specified in D1
and D1+1
Beginning
of file
File speci-
fied in D2
New file created
Memory Card or EM file memory
(Specified by the 4
th
digit of C.)
Memory Card or EM file memory
(Specified by the 4
th
digit of C.)
Existing
data
End of
file
Number of words
specified in D1
and D1+1
Starting
address
specified
in S
Starting
address
specified
in S
Overwrite
Number of words
specified in D1
and D1+1
Starting word
specified in
D1+2 and
D1+3
Overwrites or appends data in the specified data file in file memory
with the specified data from the data area in the CPU Unit. If the
specified file doesn't exist, a new file is created with that filename.
TWRIT
C
S1
S2
S3
S4
C: Control word
S1: Number of
bytes to write
S2: Directory and
file name
S3: Write data
S4: Delimiter