Kaiyi — 6.5.2 Explanation of Jump Instructions

Chapter 6 Applied Instructions 6.5.2 Explanation of Jump Instructions Symbol: S : Jump destination Explanation: 1. When some part of the program in the PLC does not need to be executed, users can use CJ or CJP to shorten the scan time. Besides, when a dual output is used, users also can use CJ or CJP. 2. If the program specified by the label is prior to the instruction CJ, the watchdog timer error will occur, and the PLC will stop running. Please use the instruction carefully. 3. The instruction CJ can specify the same label repeatedly. 4. When the instruction is executed, the actions of the devices are as follows.

 The state of Y, the state of M, and the state of S remain the same as those before the execution of the jump.  The timer stops counting.  If the instruction which is used to reset the timer is driven before the jump is executed, the timer will still be in the condition of being reset during the execution of the jump.  The general applied instructions are not executed. Example 1: 1. When X0.0 is ON, the execution of the program jumps from address 0 to address N (LABEL1:). 2. When X0.0 is OFF, the execution of the program starts from address 0, and the instruction CJ is not executed.

6-132 API Instruction code Operand Function 0400 CJ P S Conditional jump Device X Y M S T C HC D L SM SR E PR K 16# “$” DF S Pulse instruction 16-bit instruction (3 steps) 32-bit instruction AH AH -