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
API
Instruction code
Operand
Function
232~238
D
AND
※
S
1
, S
2
Comparing values
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 instructions are used to compare the value in
S
1
with that in
S
2
.
Take the instruction AND= for instance. If the comparison result is that
the value in
S
1
is equal to that in
S
2
, the condition of the instruction is
met. If the comparison result is that the value in
S
1
is not equal to that in
S
2
, 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
232
AND
=
D
AND
=
S
1
=
S
2
S
1
≠
S
2
233
AND
>
D
AND
>
S
1
>
S
2
S
1
≦
S
2
234
AND
<
D
AND
<
S
1
<
S
2
S
1
≧
S
2
236
AND
<>
D
AND
<>
S
1
≠
S
2
S
1
=
S
2
237
AND
<=
D
AND
<=
S
1
≦
S
2
S
1
>
S
2
238
AND
>=
D
AND
>=
S
1
≧
S
2
S
1
<
S
2
If a 32-bit counter is used, the 32-bit insturciton 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.1 is OFF and the value in D0 is not equal to K-10, Y1.1 is set
to ON.
When X0.0 is ON and the present value in C10 is equal to K200, Y1.0 is
ON.
When X0.2 is ON and the value in (D11, D10) is less than 678,493, or
when M3 is ON, M50 is ON.
AND=
K200
C10
DAND>
K678493
D10
M3
Y1.0
AND<>
K- 10
D0
SET
Y1.1
M50
X0.2
X0.1
X0.0
5 - 111
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...