5 Applied Instructions and Basic Usage
DVP-20PM Application Manual
5-130
API
Applicable model
20PM
232
~
238
D
D
AND※
Comparing values
Bit device Word device
X Y M S K H KnX KnY KnM KnS T C D V Z
S
1
* *
* * * * * * * * *
S
2
* *
* * * * * * * * *
Note: ※ represents =, >, <, <>, ≦ , or ≧ .
Please refer to specifications for more information about device
ranges.
16-bit instruction (5 steps)
AND※
Continuity
instruction
- -
32-bit instruction (7 steps)
DAND※
Continuity
instruction
- -
Flag: None
Explanation
The instructions are use
d to compare the value in S
1
with that in S
2
. Take the
instruction AND= for instance. If the comparison result is that the value in S
1
is
equal to that in S
2
, the condition of the instruction is met. If the comparison
result is that the value in S
1
is not equal to that in S
2
, the condition of the
instruction is not met.
S
1
: Source device 1; S
2
: Source device 2
The instruct
ion AND※ is connected to a contact in series.
API No.
16-bit
instruction
32-bit
instruction
ON OFF
232
AND= DAND= S
1
=S
2
S
1
≠S
2
233
AND> DAND> S
1
>S
2
S
1
≦ S
2
234
AND< DAND< S
1
<S
2
S
1
≧ S
2
236
AND<> DAND<>
S
1
≠S
2
S
1
=S
2
237
AND<= DAND<= S
1
≦ S
2
S
1
>S
2
238
AND>= DAND>= S
1
≧ S
2
S
1
<S
2
If a 32-bit counter is used, the 32-bit insturciton DAND※ must be used. If a
32-bit counter and the 16-bit instruction AND※ are used, ,a program error will
occur, and the ERROR LED indicator on the DVP-20PM series motion
controller used will blink. (C200~C255 are 32-bit counters.)
Example
When X1 is OFF and the value in D0 is not equ
al to K-10, Y11 is set to ON.
When X0 is ON and the present value in C10 is equal to K200, Y10 is ON.
When X2 is ON and the value in (D11, D10) is less than 678,493, or when M3
is ON, M50 is ON.
AND=
K200 C10
DAND>
K678493 D10
M3
Y10
AND<>
K-10 D0
SET Y11
M50
X2
X1
X0