Delta DVP-ES3 — 6.14.2 Explanation of Structure Creation Instructions

Chapter 6 Applied Instructions Symbol Explanation 1. This instruction executes the program between the FOR and NEXT instructions N times, where N is the value in S specified for the FOR instruction (API 1300). After the program between the FOR and NEXT instructions is executed N times, the program following the NEXT instruction is executed. The instruction FOR specifies the number of times the program between the FOR and NEXT instructions is executed. 2. N must be between 1 – 32,767. If N is less than 1, the instruction processes it as 1. 3. If you do not want to execute the program between the FOR and NEXT instructions, you can skip it with the CJ instruction (API 0400). 4.

The following conditions result in errors.  The NEXT instruction is prior to the FOR instruction. 6_  The FOR instruction exists, but the NEXT instruction does not exist.  The NEXT instruction follows the FEND or END instruction.  The number of times the FOR instruction is used in the program is different from the number of times the NEXT instruction is used in the program. 5. The FOR and NEXT instructions support the nested program structure. There can be at most 32 levels of nested program structures. If a loop is executed many times, it takes more time for the PLC to scan the program, and the watchdog timer error may occur.

You can use the WDT instruction (API 1900) to resolve the problem. 6-403 API Instruction code Operand Function 1301 NEXT - Ending a nested loop Pulse instruction 16-bit instruction 32-bit instruction - ES3 -