Mitsubishi MELSEC-Q/L Programming Manual page 645

Table of Contents

Advertisement

If the number of columns varies in each row, the data is also read by ignoring the rows.
Such file cannot be created using EXCEL. This happens when CSV file is modified by a user.
Example
If the number of columns varies in each row when the data is read:
Main / sub item
Length
CR LF
Temperature ,
-21 , CR LF
Data to be read into devices
U0
SP.FREAD
Control data
Loaded data
Stores the number of read data
Main/sub item
Data between , and ,
Measured value
Read
data
Temperature
-21
, , Measured value
,
Excess CR LF
K2
D10
D20 D99 M0
Data that was read
File name
Control data
D10
H0100
Execution/completion type
D11
-
Not used
D12
K7
No. of request read data
Not used
D13
-
D14
K0
File position
D15
K0
No. of columns designation
D16
K0
Data type specification
D17
K0
File name
D20
H4241
"ABCD"
D21
H4443
D22
H0000
Reading result (No. of read data)
D099
K7
K0
D100
Conversion data (0) is stored since "Main/sub item" is nonnumeric data.
D101
K0
Conversion data (0) is stored since " " is nonnumeric data.
D102
K0
Conversion data (0) is stored since "Measured value" is nonnumeric data.
K0
D103
Conversion data (0) is stored since "Excess" is nonnumeric data.
D104
K0
Conversion data (0) is stored since "Length" is nonnumeric data.
D105
K0
Conversion data (0) is stored since "Temperature" is nonnumeric data.
D106
K-21
Since " -21 " is a numeric value, it is converted to a binary value.
SP.FREAD
1
2
3
4
4
6
7
8
643

Advertisement

Table of Contents
loading

Table of Contents