7-66
7.5 Data Processing Instructions
7.5.3 Decoding from 8 to 256 bits
DECO
O
peration Error
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 value of n is outside the range of 0 to 8.
(Error code: 4100)
• The range of 2
n
bits from
exceeds the corresponding device.
(Error code: 4101)
Program Example
In the following program, the 3 bits from X0 are decoded when X20 turns ON, and the results are
stored to the devices starting from M10.
[Structured ladder]
[ST]
DECOP(X20,K1X0,3,M10);
[Operation]
d
0
0
0
0
0
1
0
0
0
0
0
M10
M17
0
I
f
3 bi
ts
are
spec
i
f
i
e
d
as
s
i
gn
i
f
i
cant
bi
ts
, 8
po
i
nts
are
occup
i
e
d.
Deco
di
ng
resu
l
t
0
0
1
1
0
X
0
X
1
X
2
W
hen
6 i
s
spec
i
f
i
e
d
for
X
0
to
X
2
Содержание MELSEC Q Series
Страница 1: ...Structured Programming Manual Mitsubishi Programmable Controller QCPU Common Instructions ...
Страница 2: ......
Страница 14: ...A 12 MEMO ...
Страница 340: ...6 178 MEMO MTR ...
Страница 708: ...7 368 MEMO ...
Страница 776: ...8 68 MEMO ...
Страница 796: ...9 20 MEMO ...
Страница 804: ...App 8 MEMO ...
Страница 812: ...Index 8 MEMO ...
Страница 815: ......