5 Applied Instructions and Basic Usage
DVP-20PM Application Manual
5-131
API
Applicable model
20PM
240~
246
D
D
OR※
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)
OR※
Continuity
instruction
- -
32-bit instruction (7 steps)
DOR※
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 OR= 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 instruction OR※ is connected t
o a contact in parallel.
API No.
16-bit
instruction
32-bit
instruction
ON OFF
240
OR= DOR= S
1
=S
2
S
1
≠S
2
241
OR> DOR> S
1
>S
2
S
1
≦ S
2
242
OR< DOR< S
1
<S
2
S
1
≧ S
2
244
OR<> DOR<>
S
1
≠S
2
S
1
=S
2
245
OR<= DOR<= S
1
≦ S
2
S
1
>S
2
246
OR>= DOR>= S
1
≧ S
2
S
1
<S
2
If a 32-bit counter is used, the 32-bit insturciton DOR※ must be used. If a
32-bit counter and the 16-bit instruction OR※ 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 X2 and M30 are ON, or when the value in (D101, D100) is greater than
or equal to K100,000, M60 is ON.
When X1 is ON, or when the present value in C10 is equal to K200, Y0 is ON.
OR=
K200 C10
DOR>
D100 K100000
Y0
X2
X1
M30
M60
=