6-176
6.8 Other Convenient Instructions
6.8.10 Matrix input
MTR
(7) For n, a value in the range from 2 to 8 can be assigned.
(8) No processing is performed in any of the following cases.
• The device number specified for
,
, or
is not a multiple of 16.
• The device specified for
is outside of the actual input range.
• The device specified for
is outside of the actual output range.
• The space 16 n points following the device specified for
exceeds the corresponding
device range.
• The value for n is not between 2 and 8.
O
p
erat
i
on
E
rror
In any of the following cases, an operation error occurs, the error flag (SM0) is turned ON, and
the corresponding error code is stored to SD0.
• The device other than the input (X) was specified for
.
(Error code: 4101)
• The device other than the output (Y) was specified for
.
(Error code: 4101)
Program
E
xam
pl
e
In the following program, the 16 points 3 matrix from X10 and the following devices are fetched
when X0 turns ON, and the matrix is stored to M0 and the following devices.
[Structured ladder]
[ST]
MTR(X0,X10,3,Y20,M0);
[Operation]
s
d
1
d
2
s
d
1
d
2
s
d
1
M3
2
X
0
12
M33
X
0
11
M34
M3
5
X
0
1
3
M3
6
X
0
1
4
M37
X
0
15
M38
X
0
16
M39
X
0
1
7
M40
X
0
1
8
M4
1
X
0
1
9
M4
2
X
0
1
A
M43
X
0
1
B
M44
X
0
1
C
M4
5
X
0
1
D
M4
6
X
0
1
E
M47
X
0
1
F
M
16
X
0
12
M
1
7
X
0
11
M
1
8
M
1
9
X
0
1
3
M
2
0
X
0
1
4
M
21
X
0
15
M
22
X
0
16
M
2
3
X
0
1
7
M
2
4
X
0
1
8
M
25
X
0
1
9
M
26
X
0
1
A
M
2
7
X
0
1
B
M
2
8
X
0
1
C
M
2
9
X
0
1
D
M30
X
0
1
E
M3
1
X
0
1
F
M0
X
0
12
M
1
X
0
11
M
2
M3
X
0
1
3
M4
X
0
1
4
M
5
X
0
15
M
6
X
0
16
M7
X
0
1
7
M8
X
0
1
8
M9
X
0
1
9
M
1
0
X
0
1
A
M
11
X
0
1
B
M
12
X
0
1
C
M
1
3
X
0
1
D
M
1
4
X
0
1
E
M
15
X
0
1
F
X
0
1
0
3rd ro
w
2
nd ro
w
1
st ro
w
Y
22
Y
21
Y
2
0
X
0
1
0
X
0
1
0
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: ......