A H 5 0 0 M o t i o n C o n t r o l M o d u l e M a n u a l
5 - 1 0 8
API
Instruction code
Operand
Function
218~220
D
AND#
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 AND# is connected to a contact in series.
API No.
16-bit
instruction
32-bit
instruction
ON
OFF
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
&: Logical AND operation
|: Logical OR operation
^: Logical exclusive OR operation
If a 32-bit counter is used, the 32-bit instruction DAND# must be used. If
a 32-bit counter and the 16-bit instruction AND# 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.0 is ON, 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, Y1.0 will be set to ON.
When X0.1 is OFF, a logical OR operator takes the values in D10 and
D0, and performs the logical OR operation on each pair of
corresponding bits. If the operation result is not 0, Y1.1 will be ON.
When X0.2 is ON, a logical XOR operator takes the values in (D201,
D200) and (D101, D100), and performs the logical exclusive OR
operation on each pair of corresponding bits. If the operation result is
not 0, or if X0.3 is ON, M50 will be ON.
M3
DAND
D200
D100
M50
AND
C0
C10
AND
D10
D0
SET
&
^
I
Y1.1
Y1.0
X0.0
X0.1
X0.2
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...