EasyManua.ls Logo

Scanlab RTC 4 - Circular Queue Mode Operation

Scanlab RTC 4
136 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
®
4 PC Interface Board
Rev. 1.3 e
5 Advanced Programming
44
innovators for industry
5.5 Circular Queue Mode
Instead of using the two list buffers as described in
chapter 4.1, the RTC
®
4 memory can also be used as
a circular queue. This mode allows list commands to
be sent to the RTC
®
4 continuously without any limit.
New commands are added by the application at one
point of the circular queue, while commands from
another point of the circular queue are executed at
the same time.
Initialization
The circular queue mode is enabled by the command
set_list_mode(1)
(see page 109).
This command should be called at the beginning of
the application program, i.e. before writing any list
commands.
Start
After enabling the circular queue mode, the user can
immediately start writing list commands to the
RTC
®
4. The command set_start_list must not be
used.
Execution starts automatically when the number of
stored commands exceeds 4000 or if the command
set_end_of_list is used.
While the RTC
®
4 executes a block of entered
commands, it is possible to load the circular queue
with subsequent list commands. When the end of the
list buffer is reached, the RTC
®
4 starts over at the
beginning. However, the RTC
®
4 overwrites only those
commands which have already been executed. Also
see Note (2), right.
Continuous Data Transfer
After execution of the first block of commands,
the RTC
®
4 checks if the next block of 4000
commands is ready for execution. If this is the case,
the next block is executed immediately afterwards.
Usually it takes much less time to write a list than to
execute it. Therefore it should be no problem to write
the next block of commands during execution of the
current block.
Termination
At the end of the application, usually a block of less
than 4000 commands will remain. To ensure correct
execution of this last block, it must be terminated
with the command set_end_of_list.
Circular Queue Control
If it is necessary, the command stop_execution can
be called to immediately stop execution of the
circular queue. In addition, calling the command
stop_list pauses execution and calling the command
restart_list resumes execution.
Notes
(1) When the circular queue mode is active, only the
following list handling commands can be used:
set_end_of_list
stop_execution
stop_list
restart_list.
Do not use any of the other "List Handling"
commands – see chapter 10.1 "Overview",
page 69.
(2) Avoid writing a list command into a full circular
queue because the call of that command will
automatically wait until it can enter the circular
queue. On the one hand, this guarantees that no
list command will be lost, but on the other hand,
the RTC
®
4 will not handle new control
commands during that lock period – in contrast,
control commands are immediately processed
when the circular queue is not full.
For preventing a lock period, call the command
get_list_space (page 84), which returns the
remaining capacity of the circular queue (which
has a total capacity of 8000 commands).
For relieving the RTC
®
4, it is a good idea to keep
track of the remaining capacity instead of calling
get_list_space each time before trying to write a
list command into the circular queue.

Table of Contents

Related product manuals