COM320 Voice Communications Modem
13
5.2 Voice Instructions
The example voice callback/callin program “BASIC_VOICE_2.CR1” in
(p. 6)
, provides a starting point from
which to build the features you want.
Patterned after the example program in QuickStart, voice instructions can be
combined in a variety of ways to provide phone access to datalogger data and
for control of datalogger flags/output control ports.
5.2.1 VoiceBeg / EndVoice
This instruction pair contains the code executed when the datalogger detects a
RING signal from the COM320 (a callin). It is placed in the declarations
portion of the program before the
BeginProg
instruction. The
EndVoice
instruction hangs up the modem.
VoiceHangup
is not required unless you
want to hang up the modem under certain conditions prior to the execution of
the
EndVoice
instruction.
The
VoiceKey()
instruction is also used to add a delay before the
EndVoice
instruction is executed so that the datalogger will not end the
VoiceSpeak()
instruction before the spoken message is completed.
5.2.2 VoiceSpeak
The
VoiceSpeak()
instruction defines the string spoken by the voice modem.
The string is comprised of concatenated words and string variables. To ensure
coded words are valid, CRBasic checks them against the voice.txt file, which
mirrors the word list internal to the COM320. Voice.txt resides in the
“C:\CAMPBELLSCI\LIB\COMPILER” folder.
To use
VoiceSpeak()
, select it from the instruction list in CRBasic Editor and
click
Insert
. CRBasic Editor brings up a list of available words. Words can be
inserted in any order. Words are enclosed with quotes and variables are
concatenated with words using a plus sign. For example, "50MS THE
BATTERY VOLTAGE IS" + Value(1) + "VOLTS" is a valid string. The word
“50MS” inserts a 50 millisecond pause during the announcement. 50MS can
be inserted multiple times in series to create a longer pause.
5.2.3 VoiceKey
The
VoiceKey()
instruction is used to add a delay before the
EndVoice
instruction is executed so that the datalogger does not end the
VoiceSpeak()
command before the announcement is finished.
The
VoiceKey()
instruction
Timeout
parameter is used to add a delay (in 0.01
seconds) before
EndVoice
or
Loop
is executed. Multiple
VoiceKey()
instructions placed before an
EndVoice
or
Loop
instruction increase the delay.
The
VoiceKey()
timeout provides silent time for a user to respond to the
announced menu; however, the user can respond by pressing a key in the
middle of an announcement.
When doing concurrent communications (via multiple communication
peripherals) with your datalogger, it is recommended that the
VoiceKey()
timeout be extended to over 5 seconds.
Содержание COM320
Страница 2: ......
Страница 6: ......
Страница 32: ...COM320 Voice Communications Modem 24 ...
Страница 34: ......
Страница 40: ...Appendix B Updating and Configuring the COM320 B 6 ...
Страница 46: ...Appendix D COM320 Word List D 4 ...
Страница 47: ......