C h a p t e r 5 A p p l i e d I n s t r u c t i o n s
5 - 1 0 9
API
Instruction code
Operand
Function
221~223
D
OR#
S
1
, S
2
Logical operation
Device
X
Y
M
S
K
16#
F
KnM KnS
D
W
T
C
V
Z
S
1
S
2
Pulse instruction 16-bit instruction (5 steps) 32-bit instruction (7 steps)
–
E xp la nat io n
The instruction is used to compare the value in
S
1
with that in
S
2
. If the
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.
S
1
: Source device 1;
S
2
: Source device 2
The instruction OR# is connected to a contact in parallel.
API No.
16-bit
instruction
32-bit
instruction
ON
OFF
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
&: Logical AND operation
|: Logical OR operation
^: Logical exclusive OR operation
If a 32-bit counter is used, the 32-bit instruction DOR# must be used. If a
32-bit counter and the 16-bit instruction OR# are used, a program error
will occur, and the ERROR LED indicator on the motion control module
will blink. (C200~C255 are 32-bit counters.)
E xa mple
When X0.1 is ON, Y0.0 is ON. Besides, when a logical AND operator
performs the logical AND operation on each pair of corresponding bits in
C0 and C10, and the operation result is not 0, Y0.0 is ON.
When X0.2 and M30 are ON, M60 is ON. When a logical OR operator
performs the logical OR operation on each pair of corresponding bits in
the 32-bit register (D11, D10) and the 32-bit register (D21, D20), and the
operation result is not 0, M60 is ON. Besides, when the logical XOR
operator performs the logical exclusive OR operation on each pair of
corresponding bits in the 32-bit counter C2350 and the 32-bit register
(D201, D200), and the operation result is not 0, M60 is ON.
DOR
C235
D200
OR
C0
C10
DO R
D10
D20
&
^
I
Y0.0
X0.2
X0.1
M30
M60
Summary of Contents for AH500
Page 9: ...viii...
Page 53: ...AH500 Motion Control Module Manual Wiring AH10PM 5A and a Yaskawa servo drive 2 32...
Page 55: ...AH500 Motion Control Module Manual Wiring AH10PM 5A and a Fuji servo drive 2 34...
Page 115: ...AH500 Motion Control Module Manual 4 16 MEMO...
Page 375: ...AH500 Motion Control Module Manual 5 260 MEMO...
Page 383: ...AH500 Motion Control Module Manual 6 8 MEMO...
Page 419: ...AH500 Motion Control Module Manual 7 36 MEMO...
Page 436: ...Chapter 8 Electronic Cam 8 17...
Page 483: ...AH500 Motion Control Module Manual 10 8 MEMO...
Page 505: ...AH500 Motion Control Module Manual 12 8 MEMO...
Page 515: ...AH500 Motion Control Module Manual 13 10 MEMO...
Page 544: ...Appendix A Error Code Table Table of Contents A 1 Error Code Table A 2 A 1...