E L C P r o g r a m m i n g M a n u a l
F o r m o r e i nf o r m a t i o n v i sit :
w w w. e a t o n . c o m
MN05003003E
3-74
API Mnemonic
Operands
Function
26
WAND P
S
1
, S
2
, D
Logical AND 16-bit
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K H KnX
KnY
KnM KnS T
C D E
F
S
1
*
*
*
*
*
*
*
*
*
*
*
S
2
*
*
*
*
*
*
*
*
*
*
*
D
*
*
*
*
*
*
*
*
WAND, WANDP: 7 steps
ELC ELCB
ELCM
PB PC/PA/PH
PV
PB PH/PA
32 16
P
32 16
P
32 16
P
32 16 P 32 16 P
Operands:
S
1
: First data source
S
2
: Second data source
D
: Operation result
Description:
1.
A logical AND operation is performed on the bit patterns of the contents of the two source
addresses (
S
2
and
S
1
). The result of the logical AND is stored in the destination address (
D
).
2.
For 32-bit operation please refer to the DAND instruction.
Program Example:
When X0 = ON, the 16-bit sources D0 and D2 are analyzed and the result of the logical WAND
(Word AND) is stored in D4.
WAND
X0
D0
D2
D4
0 0 0 0 1 1 1 1
1 1 1 1 1 1 1 1
0 0 0
0 0
0 0 0
0
0 0
1
1
1 1
1
0 0 0
0 0
0 0 0 0 0 0
0 0
1
1
1
WAND
b15
b00
Before
execution
After
execution
D0
D2
D4
Summary of Contents for ELC-PB
Page 1: ......
Page 5: ...For more information visit www eaton com MN05003003E iv...
Page 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Page 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Page 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Page 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...