EasyManuals Logo

Omron CJ2 CPU UNIT SOFTWARE User Manual

Omron CJ2 CPU UNIT SOFTWARE
670 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #268 background imageLoading...
Page #268 background image
7 File Operations
7-16
CJ2 CPU Unit Software User’s Manual
z General-purpose Data Files
Types of Data File
There are three kinds of general-purpose data files, with filename extensions IOM, TXT, and CSV.
*1 Reading and Writing TXT and CSV Data Files:
TXT and CSV data files can be read and written with FREAD(700) and FWRIT(701) only.
The following six data formats are used in text and CSV files.
*1 Precautions on Characters:
Data cannot be written to I/O memory properly if the TXT or CSV file contains characters other than hexadeci-
mal characters (0 to 9, A to F, or a to f.)
• Precautions on Field Size:
When words are being used, data cannot be written to I/O memory properly if the TXT or CSV file con-
tains fields that are not 4-digit hexadecimal. Likewise, when double words are being used, data cannot be
written properly if the file contains fields that are not 8-digit hexadecimal.
• Storage Order:
When words are being used, I/O memory data is converted to ASCII and stored in one-word fields in
order from the lowest to the highest I/O memory address.
When double words are being used, I/O memory data is converted to ASCII and stored in two-word fields
in order from the lowest to the highest I/O memory address. (Within the two-word fields, the higher-
address word is stored first and the lower-address word is stored second.)
• Delimiters:
When there are no delimiters, the fields are packed consecutively and then stored. When delimited by
commas, commas are inserted between fields before they are stored. When delimited by tabs, tab codes
are inserted between fields before they are stored.
When delimiters (commas or tabs) are specified in FREAD(700), the data is read as delimited data with
one-word delimiters (commas or tabs).
• Carriage Returns:
Data is packed consecutively when carriage returns are not used.
When carriage returns are used, a carriage return code is inserted after the specified number of fields.
An offset from the beginning of the file (starting read word or starting write word) cannot be specified in
the FREAD(700)/FWRIT(701) instructions if carriage returns are used in the file.
• Number of Fields:
The overall amount of data in the file depends upon the number fields (number of write items) specified in
the FWRIT(701) instruction and the number of words/field.
The size is specified with the number of fields.
With word data, 1 word in I/O memory = 1 field
With long word data, 2 words in I/O memory = 1 field.
Extension Contents Purpose
.IOM Binary format
CS/CJ-series data format
I/O memory backup
.TXT
*1
In these data formats, 1-word or 2-word fields in I/O memory are
converted to ASCII data. Records can be delimited with carriage
returns.
Exchanging data with
spreadsheet software
.CSV
Extension Data format
Contents
I/O memory size per field Delimiter
.TXT
*1
Non-delimited words 1 word None
Non-delimited double words 2 words None
Tab-delimited words 1 word Tab code
Tab-delimited double words 2 words Tab code
.CSV
*1
Comma-delimited words 1 word Comma
Comma-delimited double
words
2 words Comma

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CJ2 CPU UNIT SOFTWARE and is the answer not in the manual?

Omron CJ2 CPU UNIT SOFTWARE Specifications

General IconGeneral
BrandOmron
ModelCJ2 CPU UNIT SOFTWARE
CategorySoftware
LanguageEnglish

Related product manuals