EasyManua.ls Logo

Scanlab RTC 5 PC Interface Board - 6.5.4 Circular Queue Mode; 6.5.5 Loops

Scanlab RTC 5 PC Interface Board
622 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
RTC
®
5 PC Interface Board
Rev. 1.9 e
6 Developing User Applications
82
innovators for industry
6.5.4 Circular Queue Mode
The RTC
®
5 does not support the circular queue mode
that could be activated on the RTC
®
3/RTC
®
4 via
set_list_mode. But the RTC
®
5 can effectively
emulate this operational mode via an alternating list
change and the command load_list (page 336).
load_list ( 3, 0 )
ensures that – as in the
RTC
®
3/RTC
®
4’s circular queue mode – new
commands will be loaded only into an already
processed list (that isn’t BUSY), without needing to
explicitly supply the number of the list. And
continuous processing of list commands is not
hindered by the simultaneous loading of new
commands (also see "Alternating List Changes", page
75 and "Loading with Protection", page 72).
Users who only want to assign the list memory’s full
capacity to a single list – as realized in the
RTC
®
3/RTC
®
4’s circular queue mode – can accom-
plish this very simply via config_list (page 243).
6.5.5 Loops
Although list jumps (see page 81) and conditional
jumps (see page 213) let you repeat any number of
list commands limitlessly or under external control,
precisely specifying the number of executions isn’t
always reliably possible. But this can be achieved with
the command pair list_repeat and list_until. The
command sequence between these two short list
commands will execute exactly as often as specified
with the list_until command’s parameter, but at least
once. Here, nesting up to 8 loops deep is allowed.
The commands list_repeat and list_until must
always be used in pairs. Unpaired or superfluous
commands (list_until without an associated
list_repeat, as well as list_repeat commands leading
to a nesting depth greater than 8) will be ignored.
Empty loops (e.g. list_repeat directly followed by
list_until) will terminate immediately and not be
repeated.
You can place such command pairs not only within
lists, but also within subroutines.
In subroutines, list_until performs a list_jump_rel to
the address directly after the associated list_repeat.
Loops won’t function beyond the bounds of a
subroutine, because list jumps into or out of subrou-
tines aren’t permitted (see page 81).
Within lists, however, list_until executes a
list_jump_pos (to the address directly after the asso-
ciated list_repeat). Here, list_repeat and list_until
can even reside in two different lists, provided that
list changing is ensured via either an explicit list jump
or an automatic list change. If, on the other hand, a
list actually terminates (e.g. when using
auto_change_pos), then the list_repeat stack will
get automatically deleted and the started loop can no
longer be ended because the next list_until no longer
has its associated list_repeat.
set_end_of_list will delete the entire loop
management if no automatic list change exists, but
list_return will not.
Explicit list jumps to a list_repeat/list_until loop’s
body or from inside a loop to a loop-external location
are permissible, but can’t be monitored. Careless use
could therefore compromise loop management
integrity so severely that started loops won’t execute
as expected (but subroutine calls from inside a loop
are always reliably possible as long as the subroutine
itself contains no unpaired list_repeat/list_until
commands).

Table of Contents

Related product manuals