Example program description, Voicesetup( ) – Campbell Scientific COM320 Voice Communications Modem User Manual
Page 16

COM320 Voice Communications Modem
ElseIf (TCvalue_F > 85 AND ArmAlarm) OR ManualAlarm = TRUE Then
ManualAlarm
=
False
Alarm
=
TRUE'
Do
For i = 1 To NUMPHONES
' Call these numbers until the alarm is cleared
If Alarm Then DialVoice(phones(i)) ' Calls only if alarm is set
Next i
If
Alarm
Then
Delay(1,1,min)
Loop Until Alarm = FALSE
ArmAlarm
=
False
EndIf
Loop
EndProg
Example Program Description
Bold text indicates a CRBasic instruction. Italic text indicates a
subroutine.
NOTE
Basic_Voice_2.cr1 has five main sections:
1. VoiceSetup( ) - handles auto-disconnect.
2. Voice Beg / EndVoice - routes execution to callin or callout subroutines.
3. CallInVoice Subroutine - executes when VoiceBeg detects a callin
4. CallOutVoice Subroutine - executes when VoiceBeg detects a dial-up. It
looks for a pound (#) key to reset “alarm” variable to false.
5. SlowSequence - continually looks for the “alarm” variable to be true,
which if it is, it dials a list of phone numbers until “alarm” is no longer
true. It signals Voice Beg when a callout dial-up is in progress.
VoiceSetup( )
The VoiceSetup instruction is used to control the hang up of the COM320
voice modem. It controls which key is used to exit a subroutine and which is
used to continue to the next VoiceKey instruction. It also determines how long
the COM320 can be ‘off hook’ before the datalogger automatically hangs it up
(auto-disconnect). And it controls whether or not the modem hangs up after a
VoiceKey instruction timeout. The “Callout” parameter indicates that the
modem has received a ‘call in’ or has dialed a ‘call out.‘
10