EasyManua.ls Logo

Delta DVP-20PM

Delta DVP-20PM
580 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
5 Applied Instructions and Basic Usage
DVP-20PM Application Manual
5-43
API
Applicable model
20PM
26
D
D
WAND
P
P
Logical AND operation
Bit device Word device
X Y M S K H KnX KnY KnM KnS T C D V Z
S1
S2
D
Note: The instruction supports V devices and Z devices. (If the 16-bit
instruction is used, Z devices can not be used. If the 32-bit
instruction is used, V devices can not be used.)
Please refer to specifications for more information about device
ranges.
16-bit instruction (7 steps)
WAND
Continuity
instruction
WANDP
Pulse
instruction
32-bit instruction (9 steps)
DWAND
Continuity
instruction
DWANDP
Pulse
instruction
Flag: None
Explanation
A logical AND operator takes the bin
ary representations in S
1
and S
2
, and
performs the logical AND operation on each pair of corresponding bits. The
operation result is stored in D.
S
1
: Source device 1; S
2
: Source device 2; D: Operation result
The result in each position is 1 if the first bit is 1 and the second bit is 1.
Otherwise, the result is 0.
Example 1
When X0 is ON, a logical AND operator takes the values in the 16-bit device
D0 and the 16-bit device D2, and performs the logical AND operation on each
pair of corresponding bits, and the operation result is stored in D4.
X0
WAND D0 D2 D4
0000111111111111
00000000 00011 111
000 00 000000 00
11 1
WAND
b1
5
b0
Before the instruction
is executed
S
1
S
2
D
D0
D2
D4
After the instruction
is executed
Example 2
When X1 is ON, a logical AND operator takes the values in the 32-bit device
(D11, D10) and the 32-bit device (D21, D20), and performs the logical AND
operation on each pair of corresponding bits, and the operation result is stored
in (D41, D40).
X1
DWAND
D10 D20 D40
Before the instruction
is executed
After the instruction
is executed
DWAND
b15
b0
b31
S
1
S
2
D
D11 D10
D21 D20
D41 D40
11111111
0000
1111
000
000 000000
11 111
111
00 00
00000000
11 1
11111
11111111 1111
000 00 000 0 00
0000000000000
0000

Table of Contents

Other manuals for Delta DVP-20PM

Related product manuals