![Omron CJ1G-CPUxx Instructions Manual Download Page 923](http://html1.mh-extra.com/html/omron/cj1g-cpuxx/cj1g-cpuxx_instructions-manual_742491923.webp)
902
File Memory Instructions
Section 3-26
D: First Destination Word
When data is being read, D specifies the starting address where the data read
from file memory will be stored.
When the number of words of data is being read, the number of words is writ-
ten to D and D+1 in 8-digit hexadecimal (00000000 to 7FFFFFF). D contains
the rightmost 4 digits and D+1 contains the leftmost 4 digits.
Description
Reading Data (Third Digit of C = 0)
FREAD(700) reads the number of words or fields specified in S1 and S1+1
from the file specified in S2 (with filename extension .IOM, .TXT, or .CSV)
beginning at the address specified in S1+2 and S1+3. The data is then written
to RAM beginning at the word specified in D.
Note Data is stored in order by absolute internal memory addresses, so the output
data will overwrite data in the next data area if it exceeds the capacity of the
data area specified in D. See Precautions for more details.
When FREAD(700) is executed, the number of words (or fields) specified in
S1 and S1+1 is written to A346 and A347 (Number of Data to Transfer) and
this value is decremented by 1 as each word or field is transferred. The con-
tent of these words can be checked to verify that the expected number of
words or fields were transferred.
Reading Number of Words of Data (Third Digit of C=1)
FREAD(700) finds the number of words in the file specified in S2 (with file-
name extension .IOM) and writes that 8-digit hexadecimal value to D and
D+1.
5C
41
42
43
5C
58
"\"
"A"
"B"
"C"
"\"
"X"
S2
S2+1
S2+2
→
S2
S2+1
S2+2
59
5A
00
"Y"
"Z"
NUL
S2+3
S2+4
S2+4
S2+3
Memory Card or EM file memory
(Specified by the 1st digit of C.)
Starting read address
specified in S1+2 and S1+3
File specified
in S2
CPU Unit
Number of words specified
in S1 and S1+1
D
Memory Card or EM file memory
(Specified by the 1st digit of C.)
File specified
in S2
CPU Unit
Number of
words
Number of words
written to D and D+1.
Summary of Contents for CJ1G-CPUxx
Page 3: ...iv N o t i c e ...
Page 5: ...vi ...
Page 21: ...xxii Conformance to EC Directives 6 ...
Page 35: ......
Page 1131: ...1110 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...