5 Categories and Use of Basic Application Instructions
DVP-PM Application Manual 5-15
5.6 Application Instructions
API Mnemonic Operands Function
00
CJ P
Conditional Jump
Controllers
20PM 10PM
OP Range Program Steps
P0 ~ P255
CJ, CJP: 3 steps
Operands:
S: The destination pointer P of the conditional jump.
Explanations:
1. P cannot be modified by index registers V, Z.
2. If you need to skip a particular part of PLC program to shorten the scan time or execute dual outputs, CJ
instruction or CJ P instruction can be adopted.
3. When the program designated by pointer P is prior to CJ instruction, WDT timeout will occur and PLC will stop
running. Please use it carefully.
4. CJ instruction can designate the same pointer P repeatedly. However, CJ and CALL cannot designate the same
pointer P; otherwise operation error will occur.
5. Actions of all devices while conditional jump is being executed:
a) Y, M and S remain their previous status before the conditional jump takes place.
b) The executing 10ms timer stops.
c) General counters stop executing and general application instructions are not executed.
d) If timer is reset before CJ instruction executes, the timer will still be in the reset status while CJ instruction is
being executed.
Program Example 1:
1. When X0 = ON, the program will skip from address 0 to N (Pointer P1) automatically and keep on executing.
Instructions between address 0 and N will be skipped..
2. When X0 = OFF, program flow will proceed with the row immediately after the CJ instruction.
X0
X1
X2
CJ P1
Y1
Y2
0
N
P1
(CJ instruction)
Program Example 2:
The table explains the device status in the ladder diagram below.