![background image](http://html1.mh-extra.com/html/omron/sysmac-cs-series/sysmac-cs-series_reference-manual_7420301145.webp)
1105
File Memory Instructions
Section 3-26
Precautions
During normal instruction processing, FREAD(700) is used only to start read-
ing file memory. The instruction execution times given toward the end of this
manual are thus the times required to start reading, not to complete it. Actual
reading (transfer) is performed by the file access processing in peripheral ser-
vicing. Therefore, once FREAD(700) has been executed, reading is continu-
ously executed even if the execution condition is OFF in following cycles.
When transfer has been completed, the File Memory Operation Flag
(A34313) will turn OFF. This flag can be used for exclusive control of file mem-
ory instructions.
The time required to complete data transfer for FREAD(700) will depend on
the amount of data being transferred, the service time allocated to file access
processing, and other conditions. As a guideline, the transfer times for a cycle
time of 10 ms for a file in the root directory with the default service time set-
tings will be 0.92 s for 1,024 words and 4.64 s for 9,999 words.
The File Memory Operation Flag (A34313) will be turned ON when
FREAD(700) is executed. An error will occur and the instruction will not be
executed if A34313 is already ON.
The File Read Error Flag (A34310) will be turned ON and the instruction will
not be executed if the specified file contains the wrong data type or the file
data is corrupted. For text or CSV files, the character code must be hexadeci-
mal data and delimiters must be every 4 digits for word data and every 8 digits
for double-word data. Data will be read up to the point where an illegal charac-
ter is detected.
A few seconds is required for the CPU Unit to detect a Memory Card after it
has been inserted. If a Memory Card is going to be accessed soon after
power is turned ON or after a Memory Card is inserted, use the Memory Card
Detected Flag (A34315) in a NO input condition as shown below to be sure
that the Memory Card has been detected.
Examples
When CIO 000000 turns ON in the following example, FREAD(700) reads 10
words of data from file \ABC\XYZ.IOM starting with the beginning of the file +
5 words and outputs these 10 words to D00400 through D00409.
EM File Memory For-
mat Error Flag
A34306
ON when there is a format error in the starting
bank of EM file memory.
Number of Data to
Transfer
A346 to
A347
The contents of these words indicate the sta-
tus of data file transfers.
When an FREAD(700) or FWRIT(701) instruc-
tion is executed, the number of words or fields
to be transferred is written to these words. The
value is decremented by 1 as each word or
field is transferred.
A346 contains the rightmost 16 bits and A347
contains the leftmost 16 bits of the 32-bit
binary value.
Name
Address
Operation
FREAD
C
S1
S2
D
A34313
A34315
Execution
condition
Memory Card
Detected Flag
File Memory
Operation Flag
Содержание SYSMAC CS Series
Страница 2: ......
Страница 4: ...iv ...
Страница 30: ...xxx ...
Страница 186: ...146 List of Instructions by Function Code Section 2 4 ...
Страница 194: ...154 3 35 4 MOVE BIT MOVBC 568 1273 3 35 5 BIT COUNTER BCNTC 621 1275 3 35 6 GET VARIABLE ID GETID 286 1277 ...
Страница 1320: ...1280 Model Conversion Instructions Unit Ver 3 0 or Later Section 3 35 ...
Страница 1390: ...1350 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...
Страница 1391: ...1351 Appendix A ASCII Code Table ASCII SP Four leftmost bits Four rightmost bits ...
Страница 1392: ...1352 ASCII Code Table Appendix A ...
Страница 1404: ...1364 Revision History ...