![background image](http://html1.mh-extra.com/html/omron/cj1g-cpu-series/cj1g-cpu-series_programming-manual_742489224.webp)
203
Manipulating Files
Section 5-2
Note A computer on an Ethernet Network can read and write file memory (Memory
Cards or EM file memory) on a CPU Unit through an Ethernet Unit. Data in
files can be exchanged if the host computer functions as an FTP client and
the CS/CJ-series PLC functions as an FTP server.
The following FINS commands can be used to perform a variety of functions,
including reading and writing files.
Note The time from the CPU Unit’s internal clock is used to date files created in file
memory with the 220A, 220B, 220C, and 2203 commands.
5-2-3
FREAD(700), FWRIT(701), and CMND(490)
The FWRIT(701) (WRITE DATA FILE) instruction can be used to create a data
file containing the specified I/O memory data in a Memory Card or EM file
memory. It can also add to or overwrite from any point in existing files.
The FREAD(700) (READ DATA FILE) instruction will read I/O memory data
from a specified location from a data file in a Memory Card or EM file memory
and write it to the specified portion of I/O memory. It can read from any point
in the specified file.
Note These instructions do not transfer the specified file, but rather the specified
amount of data beginning at the specified start position in the file.
Host computer (FTP client)
Ethernet Unit
Memory Card or
EM file memory
Computer to Memory Card
File
Memory Card to computer
File
FTP command
Ethernet
Memory Card or
EM file memory
Memory Card or
EM file memory
Command
Name
Description
2201 Hex
FILE NAME READ
Reads file memory data.
2202 Hex
SINGLE FILE READ
Reads a specified length of file data from a
specified position within a single file.
2203 Hex
SINGLE FILE WRITE
Writes a specified length of file data from a
specified position within a single file.
2204 Hex
FILE MEMORY FOR-
MAT
Formats (initializes) the file memory.
2205 Hex
FILE DELETE
Deletes specified files stored in the file mem-
ory.
2207 Hex
FILE COPY
Copies files from one file memory to another
file memory.
2208 Hex
FILE NAME CHANGE
Changes a file name.
220A Hex
MEMORY AREA FILE
TRANSFER
Transfers or compares data between the I/O
memory area and the file memory.
220B Hex
PARAMETER AREA
FILE TRANSFER
Transfers or compares data between the
parameter area and the file memory.
220C Hex
PROGRAM AREA FILE
TRANSFER
Transfers or compares data between the UM
(User Memory) area and the file memory.
2215 Hex
CREATE/DELETE
SUBDIRECTORY
Creates and deletes subdirectories.
Summary of Contents for CJ1G-CPU series
Page 3: ...iv...
Page 5: ...vi...
Page 21: ...xxii Conformance to EC Directives 6...
Page 169: ...148 Task Control Instructions Section 3 32...
Page 203: ...182 Programming Device Operations for Tasks Section 4 4...
Page 253: ...232 Using File Memory Section 5 3...
Page 337: ...316 Other Functions Section 6 11...
Page 347: ......
Page 369: ......
Page 373: ......
Page 379: ......
Page 381: ...360 Revision History...