Technical data

6.13 OB 160 to 163: Loop Counters
By using these special function operation blocks, you can implement
program loops with a particularly fast runtime.
Function
A system data word is assigned to each of the four special function
OBs as follows:
RS 60: OB 160
RS 61: OB 161
RS 62: OB 162
RS 63: OB 163
Programming the
program loop
You transfer the value for the required number of loop repetitions to
one of these system data words. When you then call the appropriate
special function OB, the loop counter in the system data word is
decremented by 1. The loop is repeated until the loop counter reaches
the value zero.
Note
If the loop counter is already zero before the special function OB
is called, it is decremented by 1; the loop is then run through
65,536 times.
Parameters
System data word RS 60 - 63
Loop counters
possible values: 0 - 65 535 decimal (0 to FFFFH)
6
OB 160 to 163: Loop Counters
CPU 928B Programming Guide
C79000-B8576-C898-01
6 - 51