
start: PLAY pattern1, 100, 1
loop: PLAY pattern2, 100
LOOP 1, 10, loop
GOTO start
The next sequence example plays “pattern1” (100 bits) in a loop. When the condition mask is met
(
i.e.
at least bit 0 is set), “pattern2” is played once (also 100 bits), then the sequence starts over again.
start: PLAY pattern1, 100
BRAN !1, start
PLAY pattern2, 100
GOTO start
In the following example, “pattern1” is played in a loop until the condition mask “1” (
i.e.
at least bit 0
is set) is met. The “pattern2” is played in a loop until the condition mask “8” (
i.e.
at least bit 3 is set) is
met. Thus, “pattern1” and “pattern2” are played in an alternating way, with the two conditions
switching between the patterns.
pat1: PLAY pattern1, 100
BRAN 1, pat2
PLAY pattern1, 100
GOTO pat1
pat2: PLAY pattern2, 100
BRAN 8, pat1
PLAY pattern2, 100
GOTO pat2
If you wanted to trigger the branch manually (
i.e.
using a remote command), you could simply use the
mask returned by the query
:SEQ:STR:MASK?
, and then trigger the event once using the
command
:SEQ:STR
(this uses the “manual” event; see page 59).
In the final example, “pattern1” is played 1000 times, then “pattern2” is played. Unless the condition
mask “1” is met (
i.e.
only bit 0 is set), the sequence loops back to the beginning; otherwise (
i.e.
bit 0 is
not set), “pattern3” is played in between.
Note the “CLTR” instruction. With that instruction, the branch to “pattern3” is only taken if the
condition bit was set while “pattern2” was playing, as the trigger conditions are reset before that
pattern starts playing.
start: PLAY pattern1, 100
LOOP 1, 1000, start
CLTR 1
PLAY pattern2, 100
BRAN !1, start
loop: PLAY pattern3, 100
GOTO start
78
BitifEye Digital Test Solutions GmbH