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
256
CJN
P
S
Negated conditional
jump
Device
X
Y
M
S
K
16#
F
KnM KnS
D
W
T
C
V
Z
P
Pulse instruction 16-bit instruction (3 steps) 32-bit instruction
–
E xp la nat io n
If the conditional contact connected to CJN is ON, the next address will
be executed. If the conditional contact connected to CJN is not ON, the
address to which
S
points will be executed.
S
: Pointer (S is in the rage of P0~P255. A pointer does not support V
devices and Z devices)
If some part of the main program O100 does not need to be executed,
users can use CJN or CJNP to shorten the scan time. Besides, if a dual
output is used, users can use CJ or CJP.
If the program specified by a pointer is prior to the instruction CJN, a
watchdog timer error will occur, and the main program O100 will not be
executed. Please use the instruction carefully.
The instruction CJN can specify the same pointer repeatedly. The
pointer specified by CJN can not be the same as the pointer specified by
CALL, otherwise an error will occur.
When the instruction CJN/CJNP in a program is executed, the actions of
the devices in the program are as follows.
The states of the Y devices, the states of the M devices, and the
states of the S devices in the program remain the same as those
before the execution of the jump.
The 10 millisecond timers in the program stop counting.
The general counters in the program stop counting, and the general
applied instructions in the program are not executed.
If the instructions which are used to reset the timers in the program
are driven before the jump is executed, the timers will still be reset
during the execution of the jump.
E xa mple
When X0.0 is OFF, the execution of the program jumps from address 0
to address N (P1), and the address between address 0 and address N
are skipped.
When X0.0 is ON, the execution of the program starts from address 0,
and the instruction CJN is not executed.
(N egated conditional jump)
X0.0
X0.1
X0.2
C JN
P1
Y0 .1
Y0 .2
0
N
P1
5 - 1 2 1
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...