COM320 Voice Communications Modem
9
Const PHONE3 = "1112225555"
Dim i,Phones(NUMPHONES) As String
phones(1) = PHONE1
phones(2) = PHONE2
phones(3) = PHONE3
Alarm = FALSE
ArmAlarm = TRUE
Do
' Forever
Delay(1,1,sec)
If (TCvalue_F < 85) Then
ArmAlarm = TRUE
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
3.2 Example Program Description
Bold text indicates a CRBasic instruction. Italic text indicates a
subroutine.
Basic_Voice_2.cr1 has five main sections:
VoiceSetup()
– handles auto-disconnect.
Voice Beg / EndVoice
– routes execution to callin or callout subroutines.
CallInVoice
Subroutine – executes when
VoiceBeg
detects a callin
CallOutVoice
Subroutine – executes when
VoiceBeg
detects a dial-up. It looks
for a pound (#) key to reset “alarm” variable to false.
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
VoiceBeg
when a callout dial-up is in progress.
3.2.1 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
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’.
NOTE
Содержание 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: ......