645
SP.FREAD
1
2
3
4
4
6
7
8
7.18 Other instructions
7.18.13 SP.FREAD
If the number of columns varies in each row, the elements outside of the designated columns are ignored and "0" is
added to the places where elements do not exist.
If the number of columns varies in each row when the data is read:
Example
Data to be read into devices
SP.FREAD
D10
K2
U0 D20 D99
M0
Data that was read
File name
Control data
Control data
H0100D10
D11
D12
D13
D14
D15
D16
D17
D20
D21
D22
D099
D100
D101
D102
D103
D104
D105
-
K
6
-
K
0
K0
K2
K0
H4241
H4443
H0000
K6
K0
K0
K0
K0
K0
K-21
Execution/completion type
Not used
No. of request read data
No. of columns designation
Data type specification
File name
"ABCD"
Not used
Temperature
-21
No data
Main/sub item
Data between , and ,
Read
data
Length
Main / sub item , , Measured value Excess CR LF
Length
CR LF
Temperature
, -21 , CR LF
,
Elements outside the designated
number of columns are ignored.
Reading result (No. of read data)
Si
nce " -21 " is a numeric value, it is converted to a binary value.
No data since no element exists here, conversion data (D) is added.
Conversion data (0) is stored since " " is nonnumeric data.
Conversi
on data (0) is stored since "Length" is nonnumeric data.
Conversion data (0) is stored since "Temperature" is nonnumeric data.
Conversion data (0) is stored since "Main/sub item" is nonnumeric data.
Loaded data
Stores the number of read data
File position