Next: Operation
Up: Program Interface
Previous: Command Execution
  Contents
Commands can be given to the ZY to be executed at some future time,
for an arbitrary number of times, at arbitrary intervals. This
simple scheduler (class CmdSched) works with the ZY's clock to
determine if a command is due to be executed. If so, it executes
it, and if this is the last time the command is to be executed, it
removes the command from the execution list. The scheduler will
never execute a command before its time, but, because of the nature
of the ZY, there may be a delay between the due time and the actual
execution time of a command. The scheduler is disabled during retro
scans. A command may be removed or added to the scheduler at any
time, and the scheduler can be emptied of all commands at any time.
(This happens automatically should the ZIY disconnect from the ZY).
Assuming there are items in the scheduler's list, the scheduler
operates as shown in figure 2.10.
The scheduler operates under the following limitations:
- The scheduler is called only once per iteration through the main
ZY loop (see figure 2.4). Since the scheduler
return as soon as it finds a command ready to run, a maximum of
one command per iteration of the main loop is possible. Thus
commands cannot be scheduled to execute more rapidly than the main
loop can execute.
- When looking for commands that are ready to run, the scheduler
picks up right after the last command executed. Thus every command
will have an equal chance of running. There are no priorities.
- The scheduler does not run during measurement scans (see SCN).
Figure 2.10:
Flowchart for the ZY Scheduler routine.
 |
Next: Operation
Up: Program Interface
Previous: Command Execution
  Contents
Ramon E. Creager
2002-03-11