7.5 Data Processing Instructions
7.5.4 Encoding from 256 to 8 bits
7-67
7
APPLI
C
A
T
IO
N
INSTRUCTIONS
ENCO
ENCO
7.5.4
Encoding from 256 to 8 bits
ENCO
Function
(1) Stores the binary value corresponding to the bits set to 1 in the 2
n
-bit data of
to
.
(2) The value of n can be specified between 1 and 8.
(3) If n 0, there will be no operation, and the contents of
will not change.
(4) Bit devices are treated as 1 bit, and word devices as 16 bits.
(5) If more than 1 bit is set to 1, processing will be performed at the upper bit position.
ENCO(P)
P: Executing condition
:
indicates any of the following
instructions.
ENCO
ENCOP
Input argument,
EN:
Executing condition
:Bit
s:
Encoding data
:ANY_SIMPLE
n:
Valid bit length (1 to 8), no processing on 0
:ANY16
Output argument,
ENO:
Execution result
:Bit
d:
Encoding result
:ANY16
Setting
data
Internal device
R, ZR
J
\
U
\G
Zn
Constant
K, H
Others
Bit
Word
Bit
Word
−
−
−
n
−
−
−
Universal
UD
High
Performance
Structured ladder
ST
ENCO
EN
ENO
s
d
n
ENCO
(EN,
s
,
n
, d);
ENO:=
s
d
s
d
7
0
8
6
(
B
i
nar
y
va
l
ue
= 6)
5 4 3 2 1 0
0
1 0 0 0 0 0 0
1 1 0
s
d
d
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: ......