Omron CJ - REFERENCE MANUAL 02-2010 Reference Manual page 998

Table of Contents

Advertisement

3. Instructions
Reading/Writing a Data File in EM File Memory or Performing Another File Memory
Operation
1.
Convert all banks from the specified bank of the EM Area to file memory using the settings in the
PLC Setup.
2.
Initialize EM file memory from the CX-Programmer.
3.
Using the FWRIT(701) instruction, name a file in the specified I/O memory area and save the
data in the EM file memory.
Use the FREAD(700) instruction to read the data file from the EM file memory to I/O memory in
the CPU Unit and then manipulate the file in the Memory Card by using the CMND(490) to send
a command to the local CPU Unit.
Precautions when Using Memory Cards
Confirm the following items before using a Memory Card.
(1) Format
Memory Cards are formatted before shipping. There is no need to format them after purchase. To
format them once they have been used, always do so in the CPU Unit using the CX-Programmer or a
Programming Console.
If a Memory Card is formatted directly in a notebook computer or other computer, the CPU Unit may not
recognize the Memory Card. If this occurs, you will not be able to use the Memory Card even if it is
reformatted in the CPU Unit.
(2) Number of Files in Root Directory
There is a limit to the number of files that can be placed in the root directory of a Memory Card (just as
there is a limit for a hard disk). Although the limit depends on the type and format of the Memory Card,
it will be between 128 and 512 files. When using applications that write log files or other files at a
specific interval, write the files to a subdirectory rather than to the root directory.
Subdirectories can be created on a computer or by using the CMND(490) instruction. Refer to 3-26-6
DELIVER COMMAND: CMND(490) for a specific example using CMND(490).
(3) Number of Writes
Generally speaking, there is no limit to the number of write operations that can be performed for a flash
memory. For the Memory Cards, however, a limit of 100,000 write operations has been set for warranty
purposes. For example, if the Memory Card is written to every 10 minutes, over 100,000 write
operations will be performed within 2 years.
(4) Minimum File Size
If many small files, such as ones containing only a few words of DM Area data, are stored on the
Memory Card, it will not be possible to use the complete capacity of the Memory Card. For example, if
a Memory Card with an allocation unit size of 4,096 bytes is used, at least 4,096 bytes of memory will
be used for each file regardless of how small the file is. If you save 10 words of DM Area data to the
Memory Card, 4,096 bytes of memory will be used even though the actual file size is only 68 bytes.
Using files of such a small size greatly reduces the utility rate of the Memory Card. If the allocation unit
size is reduced to increase the utility rate, however, the access speed will be reduced.
The allocation unit size of the Memory Card can be checked from a DOS prompt using CHKDSK. The
specific procedure is omitted here. Refer to general computer references for more information on
allocation unit sizes.
(5) Memory Card Access Precautions
When the PLC is accessing the Memory Card, the BUSY indicator will light on the CPU Unit. Observe
the following precautions.
1.
Never turn OFF the power supply to the CPU Unit when the BUSY indicator is lit. The Memory
Card may become unusable if this is done.
962
CS/CJ/NSJ Series Instructions Reference Manual (W474)

Advertisement

Table of Contents
loading

Table of Contents