(Api 215~223) Logical Operation - Delta DVP-20PM Applications Manual

Hide thumbs Also See for DVP-20PM:
Table of Contents

Advertisement

5
Applied Instructions and Basic Usage
API
LD#
215~
D
D
217
Bit device
X
Y
M
S
S
1
S
2
Note: # represents &, |, or ^.
Please refer to specifications for more information about device
ranges.
E xp la nat io n
E xa mple
5-126
Word device
K
H
KnX KnY KnM KnS
S
: Source device 1; S
1
The instruction is used to compare the value in S
comparison result is not 0, the condition of the instruction is met. If the
comparison result is 0, the condition of the instruction is not met.
The instruction LD# can be connected to a busbar directly.
16-bit
API No.
instruction
215
LD&
216
LD|
217
LD^
&: Logical AND operation
|: Logical OR operation
^: Logical exclusive OR operation
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.)
A logical AND operator takes the values in C0 and C10, and performs the
logical AND operation on each pair of corresponding bits. If the operation result
is not 0, Y10 will be ON.
A logical OR operator takes the values in D200 and D300, and performs the
logical OR operation on each pair of corresponding bits. If the operation result
is not 0 and X1 is ON, Y11 will be set to ON.
A logical operator XOR takes the values in C201 and C200, and performs the
logical exclusive OR operation on each pair of corresponding bits. If the
operation result is not 0, or if M3 is ON, M50 will be ON.
C0
LD
&
D200
LD
I
C201
DLD
^
M3
Logical operation
16-bit instruction (5 steps)
T
C
D
V
Z
LD#
32-bit instruction (7 steps)
DLD#
: Source device 2
2
32-bit
ON
instruction
DLD&
S
&
1
DLD|
S
|
1
DLD^
S
^
1
C10
X1
D300
C200
Applicable model
20PM
Continuity
instruction
Continuity
instruction
Flag: None
with that in S
. If the
1
2
OFF
S
0
S
&
2
1
S
0
S
|
2
1
S
0
S
^
2
1
Y10
SET
Y11
M50
DVP-20PM Application Manual
S
0
2
S
0
2
S
0
2

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents