DVP-ES3 Series Programming Manual Symbol D : Device where the remaining number of times the loop can be executed is stored Explanation 1. This instruction terminates the FOR/NEXT loop. The remaining number of times the FOR/NEXT loop can be repeated is stored in D . After the loop has executed D times, the program jumps to the NEXT instruction and _6 executes the instruction after the NEXT instruction. 2. When the instruction 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. 3.
When the BREAK instruction is executed for the first time to terminate the FOR/NEXT loop, the program does not jump out of the FOR/NEXT loop to execute the next instruction. If the BREAK instruction is executed more than one time to terminate the FOR/NEXT loop, the program jumps to the NEXT instruction and executes the instruction following the NEXT instruction. Example 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. 6-408 API Instruction code Operand Function 1302 BREAK D Terminating the FOR-NEXT loop Device X Y M S T C HC D FR SM SR E K 16# “$” F D BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type D Pulse instruction 16-bit instruction 32-bit instruction - ES3 -