307
WAND, WANDP, DAND, DANDP
1
2
3
4
4
6
7
8
7.1
Logical oper
atio
n instructions
7.1.1
W
AN
D, WANDP, DAND
, DANDP
Program Example
(1) The following program masks the digit in the 10s place of the 4-digit BCD value at D10 (second digit from the end) to 0
when XA is turned ON.
[Ladder Mode]
[List Mode]
[Operation]
(2) The following program performs a logical product operation on the data at D99 and D100, and the 24-bit data between
X30 and X47 when X8 is ON, and stores the results at D99 and D100.
[Ladder Mode]
[List Mode]
[Operation]
When three data are set ( , ( +1, ) ( +1, ) ( +1, ))
,
: Data for a logical product operation or the head number of the devices where the data is stored (BIN 16/32 bits)
: Head number of the devices where the logical product operation result will be stored (BIN 16/32 bits)
Function
Setting
Data
Internal Devices
R, ZR
J \
U \G
Zn
Constants
K, H
Other
Bit
Word
Bit
Word
––
––
––
––
Step
Instruction
Device
1
1
1
1
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
1
0
0
1
0
0
0
0
0
0
1
0
0
b15
b8
b0
b7
b0
b7
b15
b8
AND
0
0
0
1
0
0
1
0
0
0
1
1
0
1
0
0
b0
b7
b15
b8
D10 BCD1234
HFF0F
D10 BCD1204
Step
Instruction
Device
0
0
0
0
0
0
0
0
1
1
0
1
0
1
0
0
0
0
0
0
0
0
1
1
0
1
0
1
b31
X47
AND
1
1
1
1
1
1
1
1
1
1
1
1
1
1
b31
D100
,
D99
X47 X30
D100
,
D99
b30 b29 b28 b27 b26 b25b24 b23 b22
b3 b2 b1 b0
X46
X33X32X31X30
b30 b29 b28 b27 b26 b25b24 b23 b22
b3 b2 b1 b0
Regarded as 0s.
S1
S2
D
S1
S1
S2
S2
D
D
Command
P
WAND,DAND
WANDP,DANDP
S1
S2
D
D
S1
S2
indicates an instruction s
y
mbol of
W
AND/DAND.
Command
S1 S2
D
S1
S2
D