231
Using File Memory Section 5-3
4. Use a Programming Device to read the file in EM file memory to the CPU
Unit.
Using FREAD(700)/FWRIT(701)/CMND(490)
1,2,3... 1. Use PLC Setup to specify the starting EM bank to convert to file memory.
2. Use a Programming Device to initialize EM file memory.
3. Use FWRIT(701) to name the file in the specified area of I/O memory and
then save the file to EM file memory.
4. Use FREAD(700) to read the file from the EM file memory to I/O memory
in the CPU Unit.
EM file memory operations can be executed by issuing FINS commands to
the local CPU Unit with CMND(490).
Power Interruptions while
Accessing File Memory
A file being updated may not be overwritten correctly if a power interruption
occurs while the CPU is accessing file memory (the Memory Card or EM file
memory). In this case, the affected file will be deleted automatically by the
system the next time that power is turned ON. The corresponding File Dele-
tion Notification Flag (A39507 for the Memory Card, A39506 for EM file mem-
ory) will be turned ON. The flag will be turned OFF the next time that the
power is turned OFF.
When a file is deleted, a deletion log file (DEL_FILE.IOM) will be created in
the root directory of the Memory Card or EM file memory. The deletion log file
can be read with CX-Programmer or FREAD(700) to check the following infor-
mation: The date that the file was deleted, the type of file memory (media) that
existed, the subdirectory, file name, and extension. When necessary, recreate
or recopy the deleted file.
The following diagram shows the structure of the deletion log file.
Year Month ExtensionDay
Date of file deletion
(6 bytes)
Deleted file's
extension
(4 bytes)
Media type (2 bytes)
0000: Memory Card
0001: EM file memory
Deleted file's subdirectory
and file name (73 bytes)
File size: 86 bytes
Media