Omron CJ - REFERENCE MANUAL 10-2009 Reference Manual page 983

Table of Contents

Advertisement

FREAD(700) and FWRIT(701) Operands
Bits in C
12 to 15
Data type
0: Binary (.IOM)
1: Non-delimited words (.TXT)
2: Non-delimited double-words (.TXT)
3: Comma-delimited words (.CSV)
4: Comma-delimited double-words (.CSV)
5: Tab-delimited words (.TXT)
6: Tab-delimited double-words (.TXT)
08 to 11
Carriage returns
0: No returns
8: Return every 10 fields
9: Return every 1 field
A: Return every 2 fields
B: Return every 4 fields
C: Return every 5 fields
D: Return every 16 fields
Hint
Files created in memory using the FWRIT(701) instruction will be dated using the data on the clock built
into the CPU Unit.
You cannot execute more than one FREAD(700) or FWRIT(701) instruction, execute a CMND(490)
instruction for the local CPU Unit, replace the program using an Auxiliary Area bit, or perform a simple
backup at the same time. Perform exclusive control in the program using the File Memory Operation
Flag (A343.13).
If an error occurs during FREAD(700) because illegal data is read (data that is not hexadecimal or not
8-digit or 8-digit data), reading will be stopped, but the data read to that point will remain in memory.
The File Read Error Flag (A343.10) will turn ON (but the Error Flag (P_ER) will not turn ON.
Related Auxiliary Bits/Words
Name
Memory Card Type
EM File Memory Format Error Flag
Memory Card Format Error Flag
File Write Error Flag
File Write Impossible Flag
File Read Error Flag
No File Flag
File Memory Operation Flag
Accessing File Flag
Memory Card Detected Flag
Number of Items to Transfer
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Settings
Address
A343.00 to
Indicates the type of Memory Card, if any, that is installed.
A343.02
A343.06
ON when a format error occurs in the first EM bank allocated for file memory. OFF when
formatting is completed normally.
A343.07
ON when the Memory Card is not formatted or a formatting error has occurred.
A343.08
ON when an error occurred when writing to the file.
A343.09
ON when the data couldn't be written because the file was write-protected or there was
insufficient free memory.
A343.10
ON when a file could not be read because its data was corrupted or if it contains the wrong data
type.
A343.11
ON when data could not be read because the specified file doesn't exist.
A343.13
ON for any file memory operation. OFF when no file memory operation is in progress.
• Starting Memory Card detection.
• The CPU Unit is processing a FINS command sent to itself using CMND(490).
• FREAD(700) or FWRIT(701) is being executed.
• The program is being overwritten using an Auxiliary Area control bit.
• A simple backup operation is being performed.
A343.14
ON when file data is actually being accessed.
A343.15
ON when a Memory Card has been detected.
OFF when a Memory Card is not detected.
A346 to A347
These words indicate the number of words or fields remaining to be transferred (32 bits).
When a binary (.IOM) file is being transferred, this number is decremented each time a word is
read.
When a text or CSV file is being transferred, this number is decremented each time a field is
transferred.
3. Instructions
Programming Device limitations
0 and 6 hex
0 hex or to between 8 and D hex
Operation
3
945

Advertisement

Table of Contents
loading

Table of Contents