After inserting a FOR instruction, you need to also insert the corresponding NEXT instruction.
Do not insert instructions on the same rung before or after FOR to NEXT instructions. (You cannot set any conditions on rungs with FOR or NEXT instructions.)
You cannot change the number of executions between FOR and NEXT instructions.
You cannot exit FOR and NEXT instructions midway.
You can nest FOR and NEXT instructions up to 64 times. After exceeding 64 nests, a major error occurs and error code 4 is written to#L_FaultCode.
For each nest, two stacks are used. A total of 128 stacks can be used in the logic program. Other than the FOR and NEXT instructions, the JSR instruction also uses stacks. The JSR instruction uses only one stack.