989
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
File Memory Instructions
3
FREAD
• 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 (A343.15) in a NO input condition as shown below to
be sure that the Memory Card has been detected.
Example Programming
When CIO 0.00 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 D400
through D409.
FREAD
C
S1
S2
D
A343.13A343.15
Execution
condition
Memory Card
Detected Flag
File Memory
Operation Flag
File \ABC\XYZ.IOM
CPU Unit
Wd 0
Ignored
Wd 5
Wd 14
File memory: Memory Card
Function: Read data
Number of words to read: 10 words
Starting word: Beginning of file+5 words
Directory name: \ABC
Filename: XYZ
+5 words
+10 words
0.00
D200
D400
D409
S1: D200
S1+1: D201
S1+2: D202
S1+3: D203
S2: D300
S2+1: D301
S2+2: D302
S2+3: D303
S2+3: D303
D300
D400
A343.13