Chapter 7 Second Development PlatformVP3000
377
API Instruction code Operand Function
240–246 D
OR※
S
1
, S
2
Contact type comparison OR※
Type
Operand
Bit devices Word devices
16-bit instruction (5 steps)
OR※
Continuous
execution
type
- -
32-bit instruction (9 steps)
DOR※
ontinuous
execution
type
- -
Associated flag: none
X Y M K H KnX KnY KnM T C D
S
1
S
2
Caution for using operand ※: =, >, <, <>, ≦, ≧
See the specification of each model for the scope of device’s usage.
Description
S
1
: source device 1
S
2
: source device 2
This instruction is to compare S
1
and S
2
, take API 240 (OR=) as an example, if the result is
“equal to”, the continuity of the instruction is enabled; if the result is “not equal to”, the
continuity of the instruction is disabled.
OR※ (※: =, >, <, <>, ≦, ≧) instruction is used for parallel connection with contacts
API No. 16-bit instruction 32-bit instruction
Continuity
condition
Discontinuity
condition
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
Example
When X0 = ON, and the current value of C10 = K200, then Y10 = ON
When X1 =OFF, and D0 ≠ K-10, then Y11 = ON and hold.
When X2 = ON, the 32-bit register D0 (D11) is less than 678,493 or M3 = ON, then M50 = ON.
X2 M30
M60
OR>=
K200
C10
X1
Y0
DOR>=
D100
K100000