6-118
6.4 Data Transfer Instructions
6.4.5 16-/32-bit data negation transfer
CML, DCML
DCML(P)
Inverts 32-bit data specified for
bit by bit, and transfers the result to the device
specified for
.
O
p
erat
i
on
E
rror
No operation error occurs in the execution of the CML(P) and DCML(P) instruction.
Program
E
xam
pl
e
(1) In the following program, the data in the devices from X0 to X7 are inverted, and the results
are transferred to Var_D0.
[Structured ladder]
[ST]
CML(SM402,K2X0,Var_D0);
[Operation]
s
d
1
Be
f
ore execution
0
1
1
0
1
0
0
0
1
1
1
0
0
1
0
Inverse
b15
b
0
b
0
b15
A
f
ter execution
1
1
1
1
1
1
1
1
b15
b
0
b
0
b15
0
0
0
0
0
0
0
0
s
d
s
d
T
h
ese
b
its are all regarded as 0.
D0
1 1
0
1
0 0 0 0
X
7
X
0
0 0
1
0
1 1 1 1
b
7
b
0
1 1
1
1
1
1
1
1
b15
b
8
I
f
t
h
e num
b
er o
f
b
its o
f
is smaller t
h
an t
h
e num
b
er o
f
b
its o
f
s
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: ......