![background image](http://html1.mh-extra.com/html/omron/sysmac-cs1d-cpu/sysmac-cs1d-cpu_reference-manual_7422681142.webp)
1103
File Memory Instructions
Section 3-26
Note
1.
Be sure that the character string containing the path name and file name
does not exceed the end of the data area.
2.
If the specified file or directory does not exist, the File Missing Flag
(A34311) will be turned ON and the file data will not be read.
Write the path name and filename in ASCII beginning with the leftmost byte of
S2, as shown in the following example for \ABC\XYZ.IOM. (The .IOM exten-
sion is added automatically.)
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
D
CPU Unit
Starting read address
specified in S1+2 and S1+3
File specified
in S2
Number of words specified
in S1 and S1+1
Memory Card or EM file memory
(Specified by the 1st digit of C.)
Содержание SYSMAC CS1D-CPU**
Страница 3: ...iv...
Страница 29: ...xxx...
Страница 185: ...146 List of Instructions by Function Code Section 2 4...
Страница 193: ...154 3 35 4 MOVE BIT MOVBC 568 1274 3 35 5 BIT COUNTER BCNTC 621 1276 3 35 6 GET VARIABLE ID GETID 286 1278...
Страница 1389: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2...
Страница 1390: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits...
Страница 1391: ...1352 ASCII Code Table Appendix A...