![background image](http://html1.mh-extra.com/html/omron/cs1w-etn01/cs1w-etn01_operation-manuals_742528156.webp)
7-3
Section
Using File Memory
144
Data File Format
The format of data files (files with .IOM extensions) is shown in the following dia-
gram.
Byte position from the
beginning of the file
Reserved (48 bytes)
Data
Set the reserved bytes to all zeros (00 Hex).
In this example, the
put
command (see page 148) is used to write the following
data to a file called DMDATA.IOM on a Memory Card, and then the READ DATA
FILE instruction (FREAD(700)) is used to write 5 words of data from the begin-
ning of the DMDATA.IOM file to D00000 to D00004.
D: First destination word
S2: Filename
S1: First source word
C: Control word
#0000 = Read data from Memory Card
No. of words
to read = 5
First word to
read = 0
\ D
Contents of DMDATA.IOM Data File
Reserved
(48 bytes)
Data (10 bytes)
Add 00 Hex if necessary to
make an even number of bytes.
Data Read from File
Word
Contents
D00000
133A
D00001
E4F3
D00002
CC0B
D00003
3C5F
D00004
A200
Note
1. FREAD(700) will not be able to read the last byte in a file if the files contains
an odd number of bytes. Add 00 Hex to the end of the file if necessary to
make an even number of bytes.
2. The UM and DM Areas contain binary data. Set the data type to binary using
the
type
command (see page 148) before reading or writing files using FTP.
3. Refer to the CS1-series CS1G/H-CPU
jj
-E Programmable Controllers
Programming Manual (W340) for information on the File Memory Instruc-
tions.
Writing Data Files via
FTP