Mitsubishi — 5.6 Application Instructions

5 Categories and Use of Basic Application Instructions 5.6 Application Instructions API 00 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 (CJ instruction) 0 X1 Y1 N P1 X2 Y2 Program Example 2: The table explains the device status in the ladder diagram below. DVP-PM Application Manual 5-15 Mnemonic Operands Function Controllers 20PM 10PM CJ P Conditional Jump OP Range Program Steps P0 ~ P255 CJ, CJP: 3 steps CJ P1