164
Sequence Control Instructions Section 3-4
Applicable Program Areas
Operands N: Number of Loops
The number of loops must be 0000 to FFFF (0 to 65,535 decimal).
Operand Specifications
Description The instructions between FOR(512) and NEXT(513) are executed N times
and then program execution continues with the instruction after NEXT(513).
The BREAK(514) instruction can be used to cancel the loop.
If N is set to 0, the instructions between FOR(512) and NEXT(513) are pro-
cessed as NOP(000) instructions.
Loops can be used to process tables of data with a minimum amount of pro-
gramming.
Block program areas Step program areas Subroutines Interrupt tasks
Not allowed OK OK OK
Area N
CIO Area CIO 0 to CIO 6143
Work Area W0 to W511
Holding Bit Area H0 to H511
Auxiliary Bit Area A0 to A959
Timer Area T0000 to T4095
Counter Area C0000 to C4095
DM Area D0 to D32767
Indirect DM addresses
in binary
@ D0 to @ D32767
Indirect DM addresses
in BCD
*D0 to *D32767
Constants #0000 to #FFFF (binary) or &0 to &65,535
Data Registers DR0 to DR15
Index Registers ---
Indirect addressing
using Index Registers
,IR0 to ,IR15
–2048 to +2047, IR0 to –2048 to +2047, IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –) IR0 to, –(– –) IR15
Repeated N time