![background image](http://html1.mh-extra.com/html/eaton/elc-pb/elc-pb_programming-manual_4017452672.webp)
3 . I n s t r u c t i o n S e t
M N 0 5 0 0 3 0 0 3 E 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
3 - 5 0 3
API Mnemonic
Operands
Function
218~
220
D AND#
S
1
, S
2
Series 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
*
*
*
*
*
*
*
*
*
*
*
AND#: 5 steps
DAND#: 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 of
S
2
. For example, “AND&” compares
S
1
and of
S
2
, and if the
comparison result is NOT 0, the instruction is true, and if it is 0, the instruction is false.
2.
The AND# instruction is an input instruction.
API No.
16 -bit
instruction
32 -bit
instruction
Instruction is
true
Instruction is
false
218 AND&
D
AND&
S
1
&
S
2
≠
0
S
1
&
S
2
=0
219 AND|
D
AND|
S
1
|
S
2
≠
0
S
1
|
S
2
=0
220 AND^
D
AND^
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, be sure to use the 32-bit instruction (DAND#). If
the 16-bit instruction (AND#) is used for a 32-bit counter, a “Program Error”, will occur and the
red “ERROR” indicator on the ELC panel will blink.
Program Example:
1.
When X0=ON, using the AND& (Logical “AND” operation) instruction to compare the contents
of C0 and C10. If the result is not equal to 0, Y20=ON.
2.
When X1=OFF, using the AND| (Logical “OR” operation) instruction to compare the contents
of D10 and D0. If the result is not equal to 0, set Y21=ON.
AND
C0
C10
AND
D10
D0
SET
&
|
Y21
Y20
X0
X1
Содержание 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...