Cycle instructions there are two circular area FOR beginning instruction, number FNC08, 3 programs step instructions NEXT the end of circular, the number is FNC09, taking up 1 program step, no operands.
While the program is running, is located in the FOR~NEXT the program repeated n times (determined by the operand) before continuing the implementation of follow-up procedures. The number of n=1~32767. If N=-32767~0, and as n=1.
As shown in Figure 1 as a double–nested loop, outer 5 times. If the number of D0Z 6, outer layer each time a layer b will be executed 6 times.
Be aware of when using the loop directive:
1) FOR and the NEXT must be used in pairs;
2) FX2N series PLC can be nested 5 floors;
3) CJ can be used in a loop directive did not jump out of the loop at the end of the loop;
4) FOR should be placed before the NEXT, NEXT before the END and FEND, otherwise an error occurs.
