SM3BAT User Guide
Developing Custom Programs
page
39
BIOACOUSTIC MONITORING SYSTEMS
6
Developing Custom Programs
TIP
: Start by loading one of the sample programs and then make adjustments to
create your own custom programs.
6.1
Loops
An essential logical structure in any computer program, a
loop
repeats a task,
state, or condition until a necessary event occurs. For example, you need a
program that waits, and continues to wait until sunset; and then you want it to
record, and repeat that action, recording over and over (we call that a
loop
) until
15 minutes before sunrise.
Loops are programmed by using pairs of
REPEAT
and
UNT
commands, nested to
any depth. Loops have an explicit ending condition, such as a date for an
UNTDATE
command or a count for an
UNTCOUNT
command. In addition, loops
have an implicit ending time, inherited from any enclosing loops. The implicit
ending time is the earliest of all the enclosing loop ending times. In other words,
the ending condition of a loop is either its own ending condition or the implicit
ending time, whichever occurs first.
The
RECORD
command likewise inherits an implicit ending time from any
enclosing loops, perhaps causing a
RECORD
command to finish earlier than
indicated by its own duration .
UNTCOUNT
loops do not have an ending time of their own, although they do
pass along any implicit ending time that they inherit. If a program contains just
one loop, a
REPEAT
/
UNTCOUNT
loop, with a
RECORD
command inside that
loop, then the
RECORD
command will always run for its full duration, and the
loop will end after the specified count of iterations.
6.2
AUTO Values
Instead of an explicit value, some commands allow a value of
AUTO
for one or
more of their parameters. Examples include the channel 0 and 1 parameters of the
GAIN
command and the
FS
command channels and rates. When
AUTO
values
are set, the recorder automatically chooses appropriate values based on its current
configuration. For example,
AUTO
settings tell the recorder to use the external
SMM-A1 microphone if it is attached rather than the built in microphone.
All the built-in sample programs use
AUTO
values to help you get started. The
AUTO
behavior of each command is specified in the relevant section below.
Содержание sm3bat
Страница 6: ......
Страница 71: ...SM3BAT User Guide SM3BAT Specifications page 65 BIOACOUSTIC MONITORING SYSTEMS ...
Страница 75: ...SM3BAT User Guide SM3BAT Specifications page 69 BIOACOUSTIC MONITORING SYSTEMS ...
Страница 76: ...SM3BAT Specifications SM3BAT User Guide page 70 BIOACOUSTIC MONITORING SYSTEMS ...
Страница 77: ...SM3BAT User Guide SM3BAT Specifications page 71 BIOACOUSTIC MONITORING SYSTEMS ...