Example program description, Voicesetup( ) – Campbell Scientific COM310 Voice Communications Modem User Manual

Page 16

Advertising
background image

COM310 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

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 finds, 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 COM310
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 COM310 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.‘

The VoiceSetup SecsOnLine setting is important as it
hangs up (auto-disconnects) the modem in case
someone cradles the phone or leaves the phone off-hook
without pressing star keys for an orderly “good-bye”
disconnect. Test well your entire program in this regard
before deployment to avoid possible lengthy off-hook
states disallowing incoming calls, running up a phone
bill and draining the station power supply.

WARNING

10

Advertising