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 2
API Mnemonic
Operands
Function
215~
217
D LD#
S
1
, S
2
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
*
*
*
*
*
*
*
*
*
*
*
LD#: 5 steps
DLD#: 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, “LD&” a logical AND of
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.
This instruction must be the first instruction of a rung.
API No.
16 -bit
instruction
32 -bit
instruction
Instruction is
true
Instruction is
false
215 LD&
D
LD&
S
1
&
S
2
≠
0
S
1
&
S
2
=0
216 LD|
D
LD|
S
1
|
S
2
≠
0
S
1
|
S
2
=0
217 LD^
D
LD^
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 length counter is used with this instruction, be sure to use the 32-bit instruction
(DLD#). If the 16-bit instruction (LD#) is used with a 32-bit counter, a “Program Error”, will
occur and the red “ERROR” indicator on the ELC will blink.
Program Example:
1.
The LD& (Logical “AND” operation) instruction is used to compare the contents of C0 and C10.
If the result is not equal to 0, Y20=ON.
2.
Tthe LD| (Logical “OR” operation) instruction is used to compare the contents of D200 and
D300. If the result is not equal to 0 and X1=ON, set Y21=ON.
LD
C0
C10
LD
D200
D300
SET
X1
&
|
Y21
Y20
Содержание 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...