5 Applied Instructions and Basic Usage
DVP-20PM Application Manual
5-129
API
Applicable model
20PM
224~
230
D
D
LD※
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)
LD※
Continuity
instruction
- -
32-bit instruction (7 steps)
DLD※
Continuity
instruction
- -
Flag: None
Explanation
The instruction is used t
o compare the value in S
1
with that in S
2
. Take the
instruction LD= 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 LD※ can be connect
ed to a busbar directly.
API No.
16-bit
instruction
32-bit
instruction
ON OFF
224
LD= DLD= S
1
=S
2
S
1
≠S
2
225
LD> DLD> S
1
>S
2
S
1
≦ S
2
226
LD< DLD< S
1
<S
2
S
1
≧ S
2
228
LD<> DLD<>
S
1
≠S
2
S
1
=S
2
229
LD<= DLD<= S
1
≦ S
2
S
1
>S
2
230
LD>= DLD>= S
1
≧ S
2
S
1
<S
2
If a 32-bit counter is used, the 32-bit insturciton DLD※ must be used. If a 32-bit
counter and the 16-bit instruction LD※ 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 the value in D200 is greater t
han K-30, and X1 is ON, Y11 is set to ON.
When the value in C10 is equal to K200, Y10 is ON.
When the value in C200 is less than K678,493, or when M3 is ON, M50 is ON.
LD=
K200 C10
DLD>
K678493 C200
M3
Y10
LD>
D200 K-30
X1
SET Y11
M50