33
Notes: Executing a Return for which there is no valid Call produces an indeterminate (invalid) result. See the discussion for the
Call command.
SwitchTo
Usage:
SwitchTo Step{A–H}
This command causes all channels immediately to execute the Step instruction for the prescribed step.
Notes: All channels can execute this instruction, although it is good programming procedure to have only one channel,
usually the Master, execute this instruction and thus control program flow. Having multiple channels execute this
instruction can be confusing and can produce unpredictable results if channels simultaneously execute the
instruction. The exception to this rule is the instruction SwitchTo StepH, which
always
properly switches execution to
Step H regardless of other simultaneous instructions. Step H can therefore be reserved to handle an exceptional case or
when a program is to terminate, such as when a channel detects a problem that requires an immediate shutdown or a
channel executes an Exit instruction. See the description of Exit for more information.
Stop
Usage:
Stop
The Stop instruction takes no argument and causes the channel to pause indefinitely in its current state until a user command or
Step Run instruction.
Notes: The Stop instruction terminates one of two ways: by a user command or by a step change initiated by another
channel (see the
SwitchTo
instruction above). If the Step instruction is Continue, the program will remain stopped.
Example:
…
Stop ; The program waits here for a Step change or user command.
Exit
Usage:
Exit
The Exit instruction takes no argument and behaves differently for channels and the master. The channels cannot directly force
the sequence to terminate. When a channel issues an Exit instruction, the channel executes a SwitchTo StepH instruction and
forces the sequence to remain in Step H until the sequence terminates. Recall that Step H can be reserved for any procedures
that are needed to terminate a sequence safely. Only the master has the ability to terminate a sequence and the Exit instruction
is how this is accomplished. By default, the step instruction for the master’s StepH is Exit. Thus when a channel executes Exit, the
master immediately terminates the program by itself executing Exit.
Notes: It is not necessary to terminate a sequence using an Exit instruction. A sequence can remain in an infinite loop or
stopped until a user intervenes. When a sequence terminates, all the channels automatically become inputs. To
avoid this behavior at the end of a sequence, simply stop or loop each channel in the desired state. Exit instructions may
be best reserved to handle exceptional cases and abnormal sequence termination.
Example:
Channel A–H: …
Exit ; The program switches to and forces Step H
Master:
Exit ; The program for all sequencers terminate immediately.
Inter-channel Signaling and Triggering
Flags and triggers can be set and released to control program execution, in response to signals from other channels or external
equipment.