7 APPLICATION INSTRUCTIONS
7.6 Reading/Writing Data Instructions
603
7
• This instruction reads data from the specified file. Set the execution/completion type in the control data to specify the file
read-target format.
Page 600 For RnCPU (firmware version "28" or later) and RnENCPU (firmware version "28" or later)
Page 602 For RnCPU (firmware version "27" or earlier), RnENCPU (firmware version "27" or earlier), RnPCPU, and
RnSFCPU
• The read target is the data in the SD memory card only.
• The bit device (d3) is used as the execution completion flag of the instruction. The bit automatically turns on upon execution
of the END instruction after the instruction processing completion is detected, and the bit turns off upon execution of the
END instruction in the next scan.
• If the instruction completes with an error, the bit device (d3)+1 turns on in synchronization with (d3). Therefore, the bit
device (d3)+1 can be used as the error completion flag.
• SM753 turns on while the SP.FREAD instruction is being executed.
• While SM753 is on, the instruction cannot be executed. (If executed, no processing is performed.)
• If an error is detected during the execution of the instruction, Processing Complete (d3), Error Completion (d3)+1, and
SM753 do not turn on.
• Specify data in (d1)+2, (d1)+4, (d1)+5, and (d2)+0 depending on the combination of (d1)+0 and (d1)+7.
Execution/completion type
(d1)+0
Data type
specification
(d1)+7
Processing unit and setting range
Number of read-
target data
(d1)+2
File position
(d1)+4, (d1)+5
Number of data
actually read
(d2)+0
Reading binary
data
0000H: 16-bit binary
data
0: Word Word (1 to 65535) Word (00000000H to
7FFFFFFFH)
Word
1: Byte Word (1 to 65535) Byte (00000000H to
FFFFFFFEH)
Byte
2: Unit of the data type
specified by the
execution/completion
type
Word (1 to 65535) Word (00000000H to
7FFFFFFFH)
Word
0001H: 32-bit binary
data
0: Word
1: Byte
(Cannot be specified)
2: Unit of the data type
specified by the
execution/completion
type
Double word (1 to 32767) Double word (00000000H
to 3FFFFFFFH)
Double word