Monitoring A Dialing Operation - HP 82718A Expansion Pod Reference Manual

For use with the hp-75
Hide thumbs Also See for HP 82718A Expansion Pod:
Table of Contents

Advertisement

Software Usage and Examples
10 I HPUT
II
t·~ur·lbet-
of t- i n9S ([1-15):
I I ;
t·~$
20 H=VAL(N$)
e
IF N}15 THEN 8EEP
e
GO TO 10 ! N}15 not allowed
30 IF N}9 THEN N$=CHR$(65+N-l0)
! Convert to hex di9it
40 t'10DOUT
II
~·~h ~
Pl,
C
"!~.J4$g.:CHR$
( 1 ::!)
! :::et t'10DEt'1 r'lOde and t- i
n·~
count
5t1 IF t·4 THEt·4 D I SP
"~·h
11
ansl..Jet- phone af t et-" ; tH
II
t- i
n'~5
II
I~
STOP
6(1 D
I:::W
"~.~
i l l not ansl.·Jet- phone"
The program hangs up the modem (line 40) since the modem will enter either
ANSWER
or
ORIGINATE
mode if it is off -hook when the
M
command is executed. The program will not accept a number of rings
greater than 15 (line 20), and converts numbers from 10 to 15 into single hex digits for the C command
(line 30).
Monitoring a Dialing Operation
The following example illustrates an approach to monitoring the progress of a dialing operation
programmatically. The program dials a number, then redials if the number was busy. The program halts
if 10 redials occur without connection, if a bad answer tone is received, or if there is no answer after the
maximum number of rings (ring count + 4, up to a limit of nine) or after 50 s have elapsed since dialing
ended. Modem responses are used to identify what conditions have occurred.
1 (1 D H1 t'1$ [ 100 ]
20 t-10DOUT
":·~L
0, d i 9 pl .. Jl (!:!OO) 555-1212" tCHF.:$ ( 1 ::!)
::!~)
t'1$="
II
4(1 GOSU8 1 000
I~
I F NOT PO::: (t'1$,
II
~·~8U:::""·
I I )
THEt·~
40
50 t'10DOUT
":·~t_1I
g:CHF.:$ ( 13)
60 FOF.: 8= 1 TO 10 I!! t'1$=" "
7~:1
GOSU8 1000 I!! I F
t·~OT
PO::: (t'l$,
II
:·~8U:::""·
I I )
THEt·~
70
80 t·4E::-n 8
·:H.;.1
D I
:::p
"Phone is busl::!1I
I~
:::TOP
ltH:1 DISP "Connection established"
110 ! Pro9raM continues here when connection Made
9'3~:1
!
1000 t-1$=M$tMODIN$
e
DISP M$;
1
(11~)
I F PO::: U'l$,
":·~COt-H·~ECT")
THEt·~
POP I!! GOTO 100
1 (12[1 I F PO::: (t'l$,
":·~8AD
At·t::")
THEt·~
1040
1030 IF t·WT PO::: 0'1$,
":·~t·W
At·~:::")
THEt·~
RETURt·~
1
04~)
D I
:::p
"t·~o
connect ion r·l.:rde"
I~
:::TOP
Line 20 specifies long responses and dials 9-1 (800)555-1212 (the 9 is an access code). To use short
responses, substitute 1,
B,
2, and 0 for the long responses
CONNECT, BAD
ANS, NO
ANS,
and
BUSY
respectively, and specify L 1 at line 20. The program could try to identify either the long or short
response in each situation. For example, line 1020 could be substituted with the following:
,.
Each line that looks for a modem response would look for either the long or the short response, but there •
is a potential problem with this. Recall from "Reading Modem Responses" that a single
t'10D I t·a
may not
read all the characters of a response at once-it may take more than one
t'10D
I
t·U:
to collect the entire
42

Advertisement

Table of Contents
loading

Table of Contents