8-32
8.4 Reading Data from Specified File
SP_FREAD
(2) In the following program, the file "ABCD.CSV" is read to the PC card inserted to slot 0 as
two-column table data in CSV format 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.
• Assume that the target CSV format file contains numeric values only.
[Structured ladder]
[ST]
IF X10 THEN
MOVP(TRUE,H0100,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: ......