E L C P r o g r a m m i n g M a n u a l
F o r m o r e i n f o r m a t i o n v i s i t : w w w. e a t o n . c o m M N 0 5 0 0 3 0 0 3 E
3 - 5 0 4
API Mnemonic
Operands
Function
221~
223
D
O R #
S
1
, S
2
Parallel Logic Contact Operation
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K
H KnX
KnY
KnM KnS T
C
D
E
F
S
1
*
*
*
*
*
*
*
*
*
*
*
S
2
*
*
*
*
*
*
*
*
*
*
*
OR#: 5 steps
DOR#: 9 steps
ELC ELCB
ELCM
PB PC/PA/PH
PV
PB PH/PA
32
16
P
32
16
P
32
16
P
32
16
P
32 16
P
Operands:
S
1
: Data source value 1
S
2
: Data source value 2
Description:
1.
Compare the contents of
S
1
and
S
2
. For example”OR&” compares
S
1
and
S
2
, if the comparison
result is NOT 0, the instruction is true, and if it is 0, the instruction is false.
2.
The OR# instruction is an input instruction.
API No.
16 -bit
instruction
32 -bit
instruction
Instruction is
true
Instruction is
false
221 OR&
D
OR&
S
1
&
S
2
≠
0
S
1
&
S
2
=0
222 OR|
D
OR|
S
1
|
S
2
≠
0
S
1
|
S
2
=0
223 OR^
D
OR^
S
1
^
S
2
≠
0
S
1
^
S
2
=0
3. Operators:
& : Logical “AND” operation, | : Logical “OR” operation, ^ : Logical “XOR” operation
4.
If a 32-bit counter is used with this instruction for comparison, be sure to use the 32-bit
instruction (DOR#). If the 16-bit instruction (OR#) for a 32-bit counter is used, a “Program
Error”, will occur and the red “ERROR” indicator on the ELC panel will blink.
Program Example:
If both X2 and M30 are “ON”, or when using the OR| (Logic “OR” operation) instruction to compare
the contents of D10 and D20 and the result is not equal to 0, or when using the OR^ (Logic “XOR”
operation) instruction to compare the contents of D100 and D200 and the result is not equal to 0,
M60=ON.
OR
D100
D200
OR
D10
D20
^
|
X2
M30
M60
Содержание ELC-PB
Страница 1: ......
Страница 5: ...For more information visit www eaton com MN05003003E iv...
Страница 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Страница 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Страница 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Страница 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...