Modout And Echoed Data - 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

r
responses _
move the
cters of a
:lIlect the
NECT,
the
move the
!rs for a
D). The
~
;ponses or
previous
s as well.
Second,
Software Usage and Examples
Reading modem responses is another means of detecting connection with a host computer.
Unlike
CAPP I EF.:?
or
HOOK?,
which are simple to use but only detect connection versus no connection, modem
responses such as
BAD
ANS, BUSY, NO
ANS,
and
NO
DIAL
identify the condition that prevented the
connection.
You may encounter situations which would be simplified if the responses were not reported. However,
you cannot suppress these responses from being sent by the modem-the most you can do is shorten the
responses with the
L (LONG)
command
(L 1).
Even if you don't need to use the responses, you should be
careful to strip them out of the incoming data stream so they won't clutter your data. The exact sequence
of response characters reported by the modem appears in appendix D, "HP 8 2 7 1 8A Errors and Responses".
MOD OUT and Echoed Data
As
t'1DDOUT
sends data and commands to the modem transmit buffer, some of that data may be echoed
back into the receive buffer. Possible conditions for echoing include:
1)
If the modem is echoing data (G
1),
the modem will copy the data into the receive buffer as the
data is transmitted.
2) If the modem is echoing commands
(E
0), the modem will copy the commands into the receive
buffer as it processes them.
3) Regardless of whether the modem is echoing commands, it will always place responses (either long
or short) into the receive buffer.
4) As the modem monitors the status of the phone line, some responses (such as
CONN LOST)
may be
placed in the receive buffer even though they were not initiated by a command.
5) If the host is echoing whatever it receives, the modem will put that echoed data in the receive
buffer as soon as it is received.
To prevent the possibility of any of these conditions overflowing the modem receive buffer while
transmitting,
t'10DOUT
reads the modem receive buffer and saves its contents in a buffer in the HP-75.
For example, suppose the string
this is sample data
is sent to the modem, and the host echoes
this is sam
back to the modem while the string is transmitted. As the modem receives
this is sam,
it places the string
in its receive buffer.
t'1ODOUT
removes those characters from the receive buffer as they appear, and
saves them in the HP-75. The host continues to echo
ple data
to the modem after
t'10DOUT
has ended.
When
t'10D ItU
reads the data from the modem, it returns the data saved in the HP-75 by
t'lODOUT
(this is sam),
followed by the current contents of the receive buffer
(ple data).
t'lODOUT
clears the HP-75 buffer before it starts sending data to the modem and reading echoed data
from the modem. The buffer is cleared to prevent echoed data from accumulating and using up all
available memory in the HP-75. If the echoed data is important, you should read it immediately. If you
do not read it, subsequent
t'10DOUT
s will throw it away.
Continuing the above example, suppose
this is another sample
1S
sent using
t'lODOUT. t'lODOUT
will
clear the buffer containing
this is sam,
save
ple data
in the buffer, and transmit
this is another sample.
t'lOD HU
would then return
ple datathis is another sample
(as long as another
t'10DOUT
has not cleared
the HP-75 buffer again). The relative amount of data
t'1DD I
t·~$
returns from each of the two buffers
depends on how much
t'10DOUT
put in the HP-75 buffer before it finished transmitting.
23

Advertisement

Table of Contents
loading

Table of Contents