HP 82718A Expansion Pod Reference Manual page 22

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

Advertisement

;ond
r, it
you
the
I be
me.
) be
the
for
he
or
Software Usage and Examples
waits are used in the dial string, the time to dial would be longer, and the timeout would have to be
adjusted accordingly. An alternative to using a timer is:
10 t'10DOUT
II
~·~d
10:: :::00::' 555-1212
II
tCHP$ 0: : 1:::::'
! D i a I t. he nur'lbet-
20 T==TH1E ! Init.ialize t.ir'lE'
30 IF CARRIEP? THEN
60
! Cont.inue prograM if carrier found
40 IF TIME(T+:::0 THEN :::0
5~3
BEEP
22~3,
1
I~
D I SF'
II
tk. connect. i on
II
~
!:nOF'
6(1
D I !::p
II
Connect i on est
.~b
I i shed
II
Without a programmatic timeout of some sort, the program could wait forever for a carrier. Because the
HP-7S time resets to zero each midnight, running this program within 30 s of midnight will cause it to
loop between lines 30 and 40 forever if no carrier is detected.
Another way to detect carrier uses
HOOI<?
and
CAPP I EF.:?
together. This approach does not need a
timer-when the 0 (DIAL) command gives up, the program will stop.
1 0 t'10 D 0 U T
II
~.~
d 1
0:: :::
0 0 ::. 555 - 1 2: 1 2
II
t C H P $
0::
1 ::: ::.
! D
i
.~
I t. hen
1Jr'1
b e t-
20 IF NOT HOOK? THEN 20
!
Wait. unt.il ModeM is off-hook
25
I
26
If
off-hook~
no
carriE'r~
halt prograM
27
I f
on-hook
~
i.,.I.::J
it. i n'd f ot- can- i et-,
loop
28
If on-hook and carrier det.ect.ed, cont.inue prograM
2
1
3
I
80 ON l+HOOK?+CAPRIER? GOTO 40,:::0,50
40 D I !::P
II
t·k. connect. i on
II
I~
BEEP 220, 1
I~
!::TOP
50 D I :::p
II
Connect i on est
.~b
I i shed
II
If the dial fails for whatever reason, the modem will go back on-hook. By using
HOOK?
in conjunction
with
CAF.:F:: I EF.:?,
the transition from off-hook to off -hook with carrier or from off -hook to on-hook
will detect whether or not a connection is made, as shown in the table below.
1+HooK?+
State
HOOK?
CARRIER? CARRIER?
On-hook
0
0
1
Off-hook, waiting for carrier
1
0
2
Carrier detected
1
1
3
Carrier not detected (back on-hook)
0
0
1
If the modem is pulse dialing,
HOOK?
should not be used with
CARP I EP?
to detect connection. Pulse
dialing works by actually putting the modem on-hook briefly during every pulse of the digit being dialed.
During pulse dialing, either adaptively or explicitly,
HOOK?
can return a
0
that does not reflect the true
status of the modem. If the modem is on-hook during a pulse when
HOOK?
checks the modem status,
HOOK?
will return a
0,
and
1 +HOOK?+CAF.:R I EP?
will indicate that the carrier was not detected,
even though dialing has not even finished.
21

Advertisement

Table of Contents
loading

Table of Contents