Download CS/CJ Series Programmable Controllers

Transcript
Section 5-2
Manipulating Files
2. Execution of CMND(490) to send a FINS command to the CPU Unit itself
3. Replacement of the entire program by Auxiliary Area control bit operations
4. Execution of a simple backup operation
Use the File Memory Operation Flag (A34313) for exclusive control of file
memory instructions to prevent them from being executed while another file
memory operation is in progress.
When FREAD(700) is being executed, the File Read Error Flag (A34310) will
be turned ON and the instruction won’t be executed if the specified file contains the wrong data type or the file data is corrupted. For text or CSV files,
the character code must be hexadecimal data and delimiters must be positioned every 4 digits for word data and every 8 digits for double-word data.
Data will be read up to the point where an illegal character is detected.
Related Auxiliary Bits/Words
Name
Memory Card Type
Address
Operation
A34300 to Indicates the type of Memory Card, if any, that is
A34302
installed.
EM File Memory For- A34306
ON when a format error occurs in the first EM
mat Error Flag
bank allocated for file memory. OFF when formatting is completed normally.
Memory Card ForA34307
ON when the Memory Card is not formatted or a
mat Error Flag
formatting error has occurred.
File Write Error Flag A34308
ON when an error occurred when writing to the
file.
File Write ImpossiA34309
ON when the data couldn’t be written because the
ble Flag
file was write-protected or there was insufficient
free memory.
File Read Error Flag A34310
ON when a file could not be read because its data
was corrupted or if it contains the wrong data type.
No File Flag
A34311
ON when data could not be read because the
specified file doesn’t exist.
File Memory Opera- A34313
ON for any of the following:
tion Flag
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.
208
Accessing File Flag
Memory Card
Detected Flag
A34314
A34315
Number of Items to
Transfer
A346 to
A347
ON when file data is actually being accessed.
ON when a Memory Card has been detected.
(Not supported by CS-series CS1 CPU Units that
are pre-EV1)
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.