Ethernet Units Operation Manual

166
Using File Memory Section 7-3
Data File Format
The format of data files (files with .IOM extensions) is shown in the following
diagram.
Set the reserved bytes to all zeros (00 Hex).
Writing Data Files via FTP In this example, the put command (see page 171) is used to write the follow-
ing 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
beginning of the DMDATA.IOM file to D00000 to D00004.
Contents of DMDATA.IOM Data File
Data Read from File
Note 1. FREAD(700) will not be able to read the last byte in a file if the files con-
tains 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 us-
ing the type command (see page 170) before reading or writing files us-
ing FTP.
3. Refer to the CS/CJ-series Programmable Controllers Programming Manu-
al (W340) for information on the File Memory Instructions.
Byte position from the
beginning of the file
Reserved (48 bytes)
Data
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
Reserved
(48 bytes)
Data (10 bytes)
Add 00 Hex if necessary to
make an even number of bytes.
Word Contents
D00000 133A
D00001 E4F3
D00002 CC0B
D00003 3C5F
D00004 A200