RTC
®
5 PC Interface Board
Rev. 1.9 e
6 Developing User Applications
72
innovators for industry
Loading with Protection
The loading process is initialized via the command
, which sets the input pointer to the
specified address in the selected list (just like the
command), but only if the
selected list is not currently in use. Alternatively, you
can simply let the input pointer be set to a currently
non-active or already processed list via
RTC
®
5 will automatically determine the corre-
sponding appropriate list).
The return value of the
and in which list, the loading procedure was success-
fully initialized. Otherwise, the input pointer will be
set to an invalid position, in which case no further list
commands can be input until the input pointer is
correctly set (e.g. by repeating the
command with a positive result or via the
command).
This automatically prevents unintentional over-
writing of not-yet-executed commands.
command is useful in scenarios such as
alternating list changes, where you want to wait
specifically for a list to be processed (see
).
Terminating Lists
Command lists can be, but need not necessarily be,
terminated via the
command.
However, if an unterminated command list is
executed and the output pointer thereby encounters
the last possible position in the list, the output
pointer will automatically reset to the start of the list
and processing will continue there. Automatic list
changing after a list is processed can only occur if the
list was terminated via the
command
(see
"Automatic List Changing", page 75
The loading of a
command will
not
stop the loading procedure itself. Additional
commands in the same command list can be further
loaded directly after the
command.
6.4.2 List Status
Dependent on the command input and output
statuses, lists can receive particular status values. To
examine the current statuses of the lists, the control
command
can be used –
separately for both lists.
• A list’s LOAD status (LOAD1 or LOAD2) indicates
that the input pointer is currently in this list. The
LOAD statuses of the other lists are then
not
set.
• A list’s READY status (READY1 or READY2) is set
when the
command is written
during the loading procedure. It is reset when the
list’s LOAD status is newly set.
• A list’s BUSY (BUSY1 or BUSY2) status indicates
that the output pointer is currently in this list
after list execution (of “List 1” or “List 2”) was
started. The BUSY statuses of the other lists are
then
not
set. Execution of the
command causes a reset of the BUSY status (or
alternating setting, if automatic list changing was
previously activated). If a list is opened for
loading while still being processed, its BUSY
status will still remain set.
• A list’s USED status (USED1 or USED2) is set when
the
processing. It is reset when the list’s LOAD status
is set.
Notes
• If the list status is queried during processing of a
subroutine in the protected buffer area (“List 3”),
then the status will be returned of the list (“List 1”
or “List 2”) in which the output pointer most
recently resided (typically from where the
subroutine was originally called).
• If list execution is interrupted (via
or
mentioned status values will remain unchanged.
• If list execution is aborted (via
or
an external list stop), the USED status is set for
both lists (as via initialization). Also see
ListNo
=3).
• If you want to explicitly set the USED status for a
list
ListNo
(e.g. after abortion via
or an external list stop), then
command to a free
position Pos of this list via