AH500 Programming Manual API 1302 Symbol: D : Device in which the remaining number of times the loop can be executed is stored Word P : Pointer Pointer Explanation: 1. The instruction BREAK is used to terminate the FOR/NEXT loop. The remaining number of times the FOR/NEXT loop can be repeated is stored in D , and the execution of the program jumps to the part of program specified by the pointer 2. When the instruction BREAK is executed, the remaining number of times the FOR/NEXT loop can be repeated is stored in D , including this time the instruction BREAK is executed. When the FOR/NEXT loop is executed, 1 is added to the value in D0.
When the value in D0 is equal to 30, the FOR/NEXT loop is terminated, and the remaining number of times the FOR/NEXT loop can be repeated, i.e. 71, is stored in D10. The execution of the program jumps to LABEL 1:, i.e. network 6, and 1 is added to the value in D2. Example: 6-314 Instruction code Operand Function BREAK P D, P Terminating the FOR-NEXT loop Device X Y M S T C HC D L SM SR E PR K 16# “$” DF D P Pulse instruction 16-bit instruction (3 steps) 32-bit instruction AH500 AH500 -