Omron CJ - PROGRAMMING MANUAL 08-2008 Programming Manual page 261

Programmable controllers
Hide thumbs Also See for CJ - PROGRAMMING MANUAL 08-2008:
Table of Contents

Advertisement

Manipulating Files
FREAD(700)/FWRIT(701): Transfers
between I/O memory and file memory
CPU Unit
FREAD/FWRIT
instruction
I/O memory
I/O memory
FREAD(700)/FWRIT(701) Instructions
Transferring ASCII Files
(Not supported by CS-
series CS1 CPU Units that
are pre-EV1)
Memory Card
I/O memory
EM file memory
FREAD(700) and FWRIT(701) transfer data between I/O memory and file
memory. All CJ CPU Units can transfer binary data (.IOM files) and the V1
CPU Units can also transfer ASCII files (.TXT and .CSV files).
Name
READ DATA
FILE
WRITE DATA
FILE
WRITE TEXT
FILE (See note.)
Note This instruction can be used in CPU Units with unit version 4.0 or later.
ASCII files can be transferred as well as binary files, so the third and fourth
digits of the instruction's control word operand (C) indicate the type of data file
being transferred and the number of fields between carriage returns.
Bits in C
12 to 15
Data type
0: Binary (.IOM)
1: Non-delimited words (.TXT)
2: Non-delimited double-words (.TXT)
3: Comma-delimited words (.CSV)
4: Comma-delimited double-words (.CSV)
5: Tab-delimited words (.TXT)
6: Tab-delimited double-words (.TXT)
08 to 11
Carriage returns
0: No returns
8: Return every 10 fields
9: Return every 1 field
A: Return every 2 fields
B: Return every 4 fields
C: Return every 5 fields
D: Return every 16 fields
CMND(490): File memory operations
(Not possible for CS-series CPU Units that are pre-EV1)
CPU Unit
CMND
instruction
Operation
I/O memory
Mnemonic
FREAD(700)
Reads specified data file data or data elements
to specified I/O memory.
FWRIT(701)
Uses specified I/O memory area data to create
a specified data file.
704
Creates a text file from ASCII data in the speci-
TWRIT(
)
fied I/O memory data area location.
Settings
Section 5-2
Operation
Memory Card
EM file memory
Description
Programming Device
limitations
If CX-Programmer V1.1 or an
lower version is being used,
only 0 Hex (.IOM files) can be
specified directly.
If CX-Programmer V1.2 or a
higher version (or a Program-
ming Console) is being used,
the control word bits can be
set to between 0 and 6 Hex.
If CX-Programmer V1.1 or an
lower version (or a Program-
ming Console) is being used,
only 0 Hex (no returns) can
be specified directly.
If CX-Programmer V1.2 or a
higher version is being used,
the control word bits can be
set to 0 Hex or to between 8
and D Hex.
223

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CJ - PROGRAMMING MANUAL 08-2008 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents