DAND
- 139 -
Program example
(1) Program that executes logical AND of the X30 to 47 24-bit data and D99, 100 data when X8 turns
ON, and transmit the results to M80 to 103.
K6X30DAND D99
X8
10
D99 K6M80
DMOV
Logical AND the X30 to 47 data and D99, 100
data, and store the results in D99 to 100.
Transmit the D99, 100 data to M80 to 103.
Coding
No. of
steps
Com-
mand
Device
10 LD X8
11 DAND K6X30 D99
14 DMOV D99
K6M80
18
11 1 011011101101
D100, 99
B31 B30 B29 B28 B27 B26 B25
B24 B23B22
B4 B3 B2 B1 B0
X47 to 30
0
0
0100101110000
X47 X46 X34 X33 X32 X31 X30
Interpreted as 0
DAND
00 0 000001100000
D100, 99
B31 B30 B29 B28 B27 B26 B25 B24 B23 B22 B4 B3 B2 B1 B0
Interpreted as 0
(2) Program that executes logical AND of the D0, 1 32-bit data and R108, 109 when M16 turns ON,
and outputs the results to Y100 to 11F.
D0DAND R108
M16
10
R108 K8Y100
DMOV
Logical AND the D0, 1 and R108, 109 32-bit data,
and store the results in R108, 109.
Output the R108, 109 data to Y100 to 11F.
Coding
No. of
steps
Com-
mand
Device
10 LD M16
11 DAND D0 R108
14 DMOV R108
K8Y100
18