Omron SYSMAC CJ - REFERENCE MANUAL 01-2008 Reference Manual page 1158

Sysmac cs/cj/one nsj series programmable controllers
Table of Contents

Advertisement

File Memory Instructions
Precautions
Example
Name
No File Flag
File Memory Operation
Flag
Accessing File Flag
Memory Card Detected
Flag
Number of Data Items to
Transfer
Note When another file memory related operation (file memory format, file copy, file
delete, etc.) is executed from the ladder program, send the file memory
related FINS command to the local CPU Unit with a CMND(490) instruction.
For details, refer to Section 5 File Memory Functions in the SYSMAC CS/CJ
Series Programmable Controllers Programming Manual (W394).
The File Memory Operation Flag (A34313) is turned ON when TWRIT(704) is
executed. An error will occur and the instruction will not be executed if A34313
is already ON.
The File Write Impossible Flag (A34309) will be turned ON and the instruction
will not be executed if data could not be written because the file was write-pro-
tected or there was not enough free memory.
A few seconds is required for the CPU Unit to detect a Memory Card after it
has been inserted. If a Memory Card is going to be accessed soon after
power is turned ON or after a Memory Card is inserted, use the Memory Card
Detected Flag (A34315) in a NO input condition as shown in the example
below to be sure that the Memory Card has been detected.
This example records the daily production total (number of units produced) in
D00100 and D00101 in 8-digit hexadecimal. Every day at 23:00, the program
converts the daily production total to BCD format and appends the file
LOG.TXT in the Memory Card's root directory.
Label
A34311
ON when the specified directory does not
exist when writing a file.
A34313
ON for any of the following, otherwise OFF:
• The CPU Unit has sent a command to
itself using CMND(490).
• FREAD(700), FWRIT(701), or
TWRIT(704) is being executed.
• The program is being overwritten using a
control bit in memory.
• A simple backup operation is being per-
formed.
A34314
ON when file data is actually being
accessed.
A34315
ON when a Memory Card has been
detected.
OFF when a Memory Card could not be
detected.
A346 and
The contents of these words indicate the
A347
status of data file transfers.
When an file write instruction is executed,
the number of bytes to be transferred is writ-
ten to these words. The value is decre-
mented by 1 as each byte is transferred.
A346 contains the rightmost 16 bits and
A347 contains the leftmost 16 bits of the 32-
bit binary value.
Section 3-26
Operation
1119

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents