8.4 Reading Data from Specified File
8-31
8
QCPU
INS
T
R
UCTIONS
SP
_FREAD
SP_FREAD
Program
E
xamp
l
e
(1) In the following program, 4 bytes of binary data are read from the beginning of the file
"ABCD.BIN" in the memory card inserted to drive 2 when X10 turns ON.
• Assume that 8 points from Var_D0 are reserved for the control data devices.
• Assume that 100 bytes from Var_D20 are reserved for the reading devices.
[Structured ladder]
[ST]
IF X10 THEN
MOVP(TRUE,H0000,Var_D0[0]);
MOVP(TRUE,100,Var_D0[2]);
Var_D10:="ABCD";
SP_FREAD(TRUE,2,Var_D10,Var_D0,Var_D20[0],Var_M0);
END_IF;
Summary of Contents for MELSEC Q Series
Page 1: ...Structured Programming Manual Mitsubishi Programmable Controller QCPU Common Instructions ...
Page 2: ......
Page 14: ...A 12 MEMO ...
Page 340: ...6 178 MEMO MTR ...
Page 708: ...7 368 MEMO ...
Page 776: ...8 68 MEMO ...
Page 796: ...9 20 MEMO ...
Page 804: ...App 8 MEMO ...
Page 812: ...Index 8 MEMO ...
Page 815: ......