Omron CJ - INSTRUCTIONS Reference Manual page 1031

Table of Contents

Advertisement

Function
• Overwriting Data in an Existing File (Third Digit of C=1)
FWRIT(701) uses data area data starting at the word specified in S to overwrite file memory data in
the specified data type. It overwrites the number of words or fields specified in D1 and D1+1 in the
file specified in D2 (with filename extension .IOM, .TXT, or .CVS) starting at the address specified in
D1+2 and D1+3.
In this case, the data will be overwritten up to the capacity of the existing file. Any data that exceeds
the capacity of the existing file will not be written.
CPU Unit
Starting
address
specified
in S
• Appending Data to an Existing File (Third Digit of C=0)
FWRIT(701) appends data area data starting at the word specified in S to a data file in file memory
in the specified data type. It appends the number of words or field specified in D1 and D1+1 to the
file specified in D2 (with filename extension .IOM, .TXT, or .CVS).
CPU Unit
Starting
address
specified
in S
Creating a New File with Source Data
If the file specified in D2 does not exist, FWRIT(701) creates a new file with that name and filename
extension (.IOM, .TXT, or .CVS) and writes the specified source data in the specified data type starting
at the beginning of the file. In this case, it does not matter if appending to overwriting data is specified.
CPU Unit
Starting
address
specified
in S
Data format, carriage return, carriage return position, and number of write fields
• If delimiting is specified, the specified of delimiter is added after every word for word data types and
after every two words for double-word data types.
• If non-delimited words or double-words are specified, the data for all fields is written continuously
without any delimiters. (The code for a comma is added for comma-delimiting and the code for a tab
is added for tab-delimiting.)
• If carriage returns are specified, a carriage return will be added after each set of the specified
number of words. If no carriage returns is specified, the data will be written continuously without
carriage returns.
• The number of fields specified in the write size is read from I/O memory and written to file memory in
the above format.
• If the specified directory does not exist, the File Missing Flag (A34311) will be turned ON and the file
data will not be written.
CS/CJ/NSJ Series Instructions Reference Manual (W474)
File specified in D2
Starting word
specified in
D1+2 and
D1+3
Number of
words specified
in D1 and D1+1
Overwrite
Memory Card or EM file memory
(Specified by the 1st digit of C.)
File specified in D2
End of
Existing
file
data
Number of words
specified in D1
and D1+1
Append
Memory Card or EM file memory
(Specified by the 1st digit of C.)
Beginning
File speci-
New file created
of file
fied in D2
Number of words
specified in D1
and D1+1
Memory Card or EM file memory
(Specified by the 1st digit of C.)
3. Instructions
3
993

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents