HP 82718A Reference Manual
إعلان
إعلان
* * *
HP-75 : :f:: : t: :*:
HEWLETT-PACKARD
HP
82718A
Expansion Pod
Reference Manual
For use with the HP-75
F'ihl
HEWLETT
HP 82718A
Expansion Pod
Reference Manual
For Use With the HP-75
July 1984 e*
Printed in U.S.A
82718-90001
© Hewlett-Packard Company 1984
Printing History
Edition 1 ........................................................................................................................................................... July 1984
I
•
NOTICE
The information contained in this document is subject to change without notice.
HEWLETT-PACKARD MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS
MA TERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Hewlett-Packard shall not be liable for errors contained herein or for incidental or consequential damages in connection with the furnishing, performance or use of this material.
Hewlett-Packard assumes no responsibility for the use or reliability of its software on equipment that is not furnished by Hewlett-Packard.
This document contains proprietary information which is protected by copyright. All rights are reserved. No part of this document may be photocopied, reproduced or translated to another language without the prior written consent of Hewlett-Packard Company.
Copyright © 1984 by HEWLETT-PACKARD COMPANY
r
84
Contents
Section 1
INTRODUCTION
HP 82718A Hardware.
Built-In Modem .
Electronic Disc . . .
HP 8271 8A Software .
High-Level Modem.
Low- Level Modem .
Electronic Disc . . .
Bar Code . . . . . .
Installing the HP-7 5 Into the HP 827l8A
Connecting and Disconnecting the Wand.
Using the Built-In Modem . . . . . . . . .
Notifying the Telephone Company. . .
Connecting and Disconnecting the Telephone Line.
Telephone Company Rights and Responsibilities.
Identifying Problems.
How to Use This Manual. . . . . . . . . . . . . . .
Section 2
SOFTWARE USAGE AND EXAMPLES
• •
Overview of Modem Operation . . . . . .
Adapting Existing Programs to Use the Modem
Core Input and Output Commands
Device-Specific Command Syntax.
Status Conditions . . . . . .
Modem Power . . . . . . . .
Additional Modem Features.
High -Level Modem Software
Initializing the Modem . . . . .
Turning the Modem On. . . . .
Detecting Connection With a Host Computer
Reading Modem Responses . . .
MODOUT and Echoed Data . .
MODOUT and Out of Memory.
Retransmitting Received Data
Terminal Program . . . .
Low-Level Modem Software
Modem Modes. . . .
Modem Parameters .
Default State. . . .
Modem Responses. .
Low-Level Modem Command Syntax
Software Handshake Protocol.
ENQ/ ACK Protocol .
XON/XOFF Protocol
Prompt Mode. . . .
Combined Protocols .
· 19
· 19
· 19
.20
.22
.23
.24
.24
.24
.27
.27
.28
.29
· 15
· 16
· 16
· 17
· 17
· 18
· 18
· 30
.30
· 31
· 32
· 32
· 32
· 33
· 10
· 10
· 10
· 11
· 12
12
7
8
8
8
8
7
7
7
7
· 12
Buffer Control . .
Modem Deadlock .
Adaptive Dialing.
Adaptive Dialing Using the DIAL Command.
Adaptive Dialing Using Modem Responses.
Dial Strings for Adaptive Dialing.
Tone Dial String. .
Pulse Dial String. . . . . . . .
Total Dialing Time . . . . . . .
Using a Telephone as a Line Monitor.
Man ual Dialing. . . . . . . . . . . .
Connecting Two Pods Back-to-Back .
Auto-Answer . . . . . . . . . . . . .
Monitoring a Dialing Operation . . .
Uploading a Text File to a Host Computer.
Command, Data, and Response Echoing
Sending Command Characters as Data.
Decoding the QUERY Response . . . .
Electronic Disc Software. . . . . . . . . .
Adapting Existing Programs to Use the Electronic Disc
Initializing the Electronic Disc.
Interaction With the I/O ROM.
Hierarchical File Structure.
Directory Levels . . . . . .
Pathnames . . . . . . . . .
Wild Cards in Pathnames
Examples of Pathnames
Comprehensive Example . .
Bar Code Software. . . . . . .
Scanning a Bar Code Label.
Using Audible and Visual Prompts.
Checking Field Length .
Verifying Check Digits.
Comprehensive Example
Section 3
KEYWORD DICTIONARY
Section 4
LOW-LEVEL MODEM COMMAND DICTIONARY
Appendix A
OWNER'S INFORMATION
Serial Number . . . . .
Environmental Limits.
Operating Precautions.
HP 82 718A Specifications.
General Specifications .
Contents r
(
· 43
· 45
· 45
· 47
· 49
· 49
· 50
· 51
· 37
· 38
· 38
· 38
· 39
· 40
· 41
· 42
· 33
· 34
· 34
· 35
· 36
· 37
· 51
· 52
· 52
· 53
· 53
· 54
· 56
· 56
· 56
· 57
· 57
· 58
•
•
· 93
· 93
~.
· 94
I
~nts Contents
38
39
W
~ 1
:2
33
34
34
35
36
37
37
38
38
7
9
~
)
3
5
5
I
I
Modem Specifications . . .
Electronic Disc Specifications.
Bar Code Specifications.
Power Supply Information.
Power Consumption. . .
Low Battery Safeguards.
Battery Recharging . . .
Replacing the Battery Packs
Rechargeable Battery Care.
General Cleaning Information.
Verifying Proper Operation.
Limited One-Year Warranty
What We Will Do. . . . .
What Is Not Covered . . .
Warranty for Consumer Transactions in the United Kingdom.
Obligation to Make Changes
Warranty Information . . . . . . . . . . . . .
Service . . . . . . . . . . . . . . . . . . . . . . .
Obtaining Repair Service in the United States.
Obtaining Repair Service in Europe
International Service Information
Service Repair Charge
Service Warranty. . .
Shipping Instructions .
Further Information .
Potential for Radio/Television Interference (U. S. A. Only)
When You Need Help . . . . . . . . . . . . . . . . . . .
Appendix B
ACCESSORIES INCLUDED WITH THE HP 82718A
Appendix C
KEYWORD TAKEOVER AND DUPLICATE KEYWORDS
Keyword Takeover by the HP 8271 8A
Abbreviating Keywords .
System Configuration
Duplicate Keywords. . .
Appendix D
HP 82718A ERRORS AND RESPONSES a.
Alphabetical Error Listing . . . . . . . . .
Numerical Error Listing and Descriptions.
Alphabetical Response Listing. . . . . . .
Numerical Response Listing and Descriptions.
Exact Sequence of Response Characters.
Command String Echoing.
Dial String Echoing. . . . . . . . . .
107
107
108
108
109
109
111
111
113
115
116
.94
.94
· 95
.95
· 95
.96
.97
.97
· 98
.98
· 98
.99
.99
102
103
103
103
103
103
104
.99
100
100
100
101
101
101
Appendix E
KEYWORD AND COMMAND SUMMARY
High-Level Modem Keywords.
Low-Level Modem Commands
Electronic Disc Keywords .
Bar Code Keywords . . . . . .
Contents
J
117
118
119
120
•
•
nts
~1_NT_R_O_D_U_C_TI_O_N
______________
~lr~!HI,
17
18
~9
~O
I •
Congratulations on your purchase of the HP 82 718A Expansion Pod. This device attaches directly to an
HP-7S portable computer and enhances its abilities as a powerful tool for portable data collection applications. This introductory section of the manual will highlight some of the key features and capabilities you now have at your fingertips.
HP 82718A HARDWARE
The combination of the HP 82718A with your HP-7S is a single, rugged, integrated package with data communications capability and a large memory for program and data storage. The HP 82718A connects to the right-most ROM port on the front of your HP-7S, leaving two ports available for up to 64 kbytes of your ROM-based application software.
Built-In Modem
The built-in modem is a direct-connect 300 baud modem compatible with Bell 103/113 modems. It has originate, answer, and auto-answer capability, and can dial manually or automatically using either tones or pulses. The modem supports both XON/XOFF and ENQ/ ACK handshake protocols, and several parity options (odd, even, always I, always 0, or none). Two modular RJ 11 jacks enable you to use the modem as an auto-dialer or use a telephone as a line monitor.
Electronic Disc
The HP 82718A Option 032 or 064 provides either 32 or 64 kbytes of additional random access memory
(RAM). This additional RAM simulates a mass storage device such as a digital cassette or disc drive.
Unlike a mechanical device, however, you get fast data transfer and rugged, reliable operation.
HP 82718A SOFTWARE
The HP 82718A contains 16 kbytes of ROM-based software that provides 34 new BASIC keywords to the
HP-7S's already powerful BASIC language, plus 22 commands that control the modem. These S6 commands give the HP-7S the ability to send data to and receive data from the modem, copy files into and out of the electronic disc, and decode two types of bar code labels. The software is divided into four functional areas, described below.
High-Level Modem
The high -level modem software consists of 11 BASIC keywords that provide the ability to turn the modem on and off, transmit strings to and from the modem, and check the status of the modem. Strings sent to the modem can contain data, low-level modem commands, or both.
7
8
,
Introduction
Low-Level Modem
The low-level modem software consists of 22 commands, all transmitted to the modem via the high-level. modem software. These commands directly control such modem operations as dialing, changing modem operating modes, and setting handshake protocol and parity.
Electronic Disc
The electronic disc software consists of 17 BASIC keywords that allow the RAM to simulate a mass storage device. These keywords provide the ability to create, access, and modify text and data files, establish a hierarchical file structure, and copy files into and out of the electronic disc.
Bar Code
The bar code software consists of 6 BASIC keywords that allow the HP-7SD to decode Code 39 and Code
11 bar code labels. The commands provide the ability to scan single labels with audible feedback for whether or not the scan was successful. The decoders can automatically verify the check digit of a scanned label or of unscannable labels entered from the keyboard.
INSTALLING THE HP-75 INTO THE HP 82718A
CAUTION
During this installation, you will have to remove the battery pack from the
HP-7S. You may wish to copy critical files to a mass storage medium before removing the battery pack to avoid the possibility of losing important information if a reset occurs.
•
You will need only a Phillips or Pozidriv screwdriver to install the HP-7S into the HP 82718A. Here is the installation procedure:
1) Turn off the HP-7 S. Press [SHIFT] [ATTN] or type B'lE [RTN].
2) Remove any plug-in module or port cover from the right-most ROM port on the front of the
HP-7S.
3) Connect the ac adapter/recharger to the HP-7 S.
4) Take off the HP-7 5 battery door and remove the battery pack. Save the door, as you will need it if you ever remove the HP-7S from the HP 82718A.
5) Take off the HP 82718A battery door. Insert the HP-75's battery pack into the HP 82718A's battery compartment. Be sure to align the contacts of the battery pack with the spring contacts in the compartment.
6) Replace the HP 82718A battery compartment door and secure its two latches.
I t.
i,
'eI m
,
7) Set the HP 82718A right-side up so its nameplate is facing you. The area marked # 1 in the photo is the battery box, and #2 is the ROM connector.
In trod uction
. .
• . '1::
;
~~:::;
2,;;
~
:
.
~
8) Place the carrying clips as shown. Notice that they are both oriented in the same direction. If you do not plan to use the clips, you do not have to install them, or you can place them one rib farther back, and they will be fully concealed by the retainers that hold the HP -75 to the HP S 2 71 SA. t J 9) Plug the HP S2718A ROM connector securely into the right-most port on the HP-75. Then set the HP-75 down onto the battery box. The tab protruding from the bottom of the ROM connector slips inside the slot on the HP S 271 SA housing.
10) Holding the HP-75 securely to the HP S 271 SA, attach the two plastic retainers to the unit by screwing in the six long screws provided into the six holes on the bottom of the
HP S 2 71 SA. Be sure the carrying clips align with the notches on the retainers.
,
Your HP 8271SA Expansion Pod is now ready for use.
9
Introduction
NOTE
When you first turn on the HP-75, you may see either EPPOF.:: r'loder'l co 1 d st. .:H-t. or E F.: F.: 0 F.: : >=:t'1Et'1 I tH T I AL I ZEd. These errors only indicate that the battery packs need recharging before they can supply sufficient battery power for the modem or electronic disc.
CONNECTING AND DISCONNECTING THE WAND
1) Turn off the HP-75D. Press [SHIFT] [ATTN] ortypeE:\'E [RTN].
2) Insert the wand's plug into the outlet on the back edge of the
HP-75D, as shown in the photo at right.
'.
3) To remove the wand, turn off the HP-75D and push down on the button on top of the plug while pulling the plug out.
USING THE BUILT-IN MODEM
The HP 82718A has a built-in modem that provides data communication capability, in the United States, for the HP-7 5 portable computer. This modem connects directly to the telephone line~ system that is superior to an acoustic coupler connection.
The Federal Communications Commission (FCC) requires specific procedures for installing and operating equipment that uses public communication lines. Therefore, you should read this section carefully before attempting to connect your modem to the telephone line.
Notifying the Telephone Company
The HP 82718A is registered with the FCC for direct connection to a standard single-party telephone line; connection to pay telephones or party lines is prohibited. If you are unsure about the suitability of your telephone line, contact your telephone company.
Before you connect the HP 82718A modem to the telephone line for the first time, FCC rules require that ( • you notify your telephone company. You should tell them of your intention to connect an
FCC-registered device to your telephone line. They need to know the following information:
10
•
Introduction
• Telephone number of the line to which the modem is connected
• Manufacturer: Hewlett-Packard
• Model Number: HP 82718A
• FCC registration number: AU492X-12571-DM-E
• Ringer equivalence number: 0.8 B
The FCC registration number and the ringer equivalence number are located on the bottom face of your
HP 82718A.
If you plan to connect the HP 8271 8A to different telephone lines, furnish the telephone company with a list of these numbers to avoid notifying them every time you move your unit. Notify the telephone company again when the HP 8271 8A is permanently removed from the line.
Connecting and Disconnecting the Telephone Line
Turn off the modem before plugging a phone line into either modular jack on the HP 82718A. Also turn off the HP-75 unless your application program needs to prompt the user to connect the phone line. The modem can be turned off either by turning off the HP-75, by executing t'10DEt'1 OFF, or by executing
I H IT I FI LIZ E ": t'1
I]
Dt'111 .
To connect the modem to the telephone network, you will need a cable with modular telephone plugs on both ends and a modular telephone jack. If your telephone jack has four round holes, you will need an adapter plug that converts your jack from four-prong to modular. Cables and jacks are available from electronics stores or the telephone company.
If you want to plug the HP 82718A into a modular jack into which a telephone set is currently connected
(that is, if you want to replace a telephone with the HP 82 718A), the telephone should have the same kind of modular jack as the modem. Unplug the cable from the telephone, then plug the loose end of the cable into either of the two jacks on the rear panel of the HP 8271 8A.
The plugs on the cable can be inserted into the jacks in only one way. The small plastic tab will snap in when the plug is properly connected. When you pull gently on the cable, it should not pull out of the jack until you press the plastic tab.
You may wish to share a single wall jack between a telephone set and the HP 8271 8A, and use the modem as an auto-dialer for voice communications, or the telephone as a line monitor for data communications.
You may do this by purchasing an extra cable with modular plugs on each end from an electronics or telephone supply store. Connect one end of the extra cable to the second jack on the HP 82 718A and the other end to the telephone, as shown in the figure. Note that you cannot simultaneously carryon a voice call and use the HP 82718A modem. However, you can listen to the HP 82718A transferring data on the telephone set.
11
Introduction
12
PHONE LINE
_____ l~!~:------------+.
PHONE JACK
TELEPHONE HP 82718A
Telephone Company Rights and Responsibilities
The circuitry in your HP 82 718A is designed to protect both the phone line and the modem from damage caused by high voltages, and is approved by the Federal Communications Commission. However, the telephone company has the legal right to discontinue service if the HP 8271 8A should somehow cause harm to the telephone network. In this case, the telephone company will:
I
• Promptly notify you of the service interruption.
• Give you the opportunity to correct the situation that caused service to stop.
• Inform you of your right to bring a complaint to the FCC concerning the service interruption.
The telephone company may make changes in its facilities and services which may affect the operation of your equipment. However, you will be given adequate notice in writing to allow you to maintain uninterrupted service.
~.
Identifying Problems
If you have problems with normal telephone calls when the HP 82718A is connected to the line (but not in use), you must determine if the HP 82 718A is the cause. Disconnect your unit from the phone line. If the trouble continues, contact your telephone company to have your line checked.
If the trouble stops when the HP 82718A is disconnected, you will need to have your unit repaired.
Obtaining service is described in appendix A.
Do not attempt to service the HP 8271 8A yourself. Doing so is a violation of FCC rules and may result in damage to the telephone network.
HOW TO USE THIS MANUAL
This manual is written primarily as a reference for application programmers, and not as a tutorial. The examples, with a heavy emphasis on programmatic use of the commands available in the HP 82718A, assume that you are well-versed in HP-7S BASIC language programming and the operation of the
HP-7S.
The bulk of the applications written will probably take advantage of the data communications, bar code, and large memory provided by the combination of the HP-7SD and HP 8271 8A. As such, the manual assumes that you understand data communications and the uses of machine-readable (bar code) labels.
I
_.
•
~,
,
Introduction
The application section is Section 2, "Software Usage and Examples". It provides information about the four software categories, and gives examples of how to use the software.
The main reference sections are Section 3, "Keyword Dictionary", and Section 4, "Low-Level Modem
Command Dictionary" and Appendix D, "HP 8 2 718A Errors and Responses". Section 3 contains syntax and descriptions of the high -level modem, electronic disc, and bar code keywords. Section 4 contains syntax and descriptions of the low-level modem commands. Appendix D contains descriptions of all errors and responses reported by the HP 827 1 8A.
We expect that it will take some time to become proficient with the concepts and commands presented here, through a combination of reading the manual and experimenting with the many features of the
HP 82718A. Many of the commands can be studied by executing them from the keyboard and observing the results. The low-level modem commands are best studied through the use of a terminal program, as described in Section 2. Once you gain this expertise, you will be able to use the HP-75 as a powerful tool for portable data collection applications .
13
\1 • r
•
j
,.
~SO_F_T_W_A_R_E_U_S_A_G_E_A_N_D_EX_A_M_P_L_E_S_--llrd!iH1'\
This section of the manual will provide supplemental information about the operation of the modem, electronic disc, and bar code software, and examples of the use of the software.
OVERVIEW OF MODEM OPERATION
There are two types of modem commands provided by the HP 827l8A. High -level modem commands are
BASIC keywords that add to the set of commands you can execute from the keyboard or put in BASIC programs. Examples of high-level commands are t'1ODEt'1 Ot·~
(turn on the modem), t'1ODOUT (send a string to the modem), and CAF.:F.: I EF::? (check if there is a carrier). Low-level modem commands are commands that tell the modem to perform a specific action. Examples of low-level commands are D (dial a phone number), F (set data format or parity), and 0 (enter ORIGINATE mode). The HP-7 5 communicates with the modem primarily with two high-level modem commands: t'10DOUT and t'10D HU:. These
BASIC keywords are the real workhorses of the HP-75/modem system. low-level modem commands from the HP-75 to the modem. t'10DOUT sends data and t'1OD I t·U:: reads the contents of the modem receive buffer and returns that data to the HP-7S. In addition, six other high-level modem commands identify certain modem status conditions, such as parity and framing errors, carrier detected, etc. Below is a block diagram of the HP-7S/modem system.
• j
HP-75
MODOUT
MODIN$
AVAIL?, CARRIER?, FRAME?,
HOOK?, PARITY?, READY?
I
I
HP 82718A MODEM
'I
I
MODEM COMMANDS t
TRANSMIT BUFFER
I
I
I
TO PHONE LINE
FROM PHONE LINE
I
I
RECEIVE BUFFER i
I
MODEM RESPONSES
I
1
STATUS
I
When t'10DOUl sends a string from the HP-7S to the modem, it places the string in the 8-byte modem transmit buffer. The modem then examines the transmit buffer to see what action it should take. If the
15
16
Software Usage and Examples string is just data, the data is transmitted over the phone line. If the string contains low-level modem commands, the commands are not transmitted, but are processed locally. t t'10D I t-U: reads the contents of the 64-byte modem receive buffer and returns that data as a string to the
HP-75. When data arrives from the phone line, the modem places it in the receive buffer for t'lODHU to read. When low-level commands or data from the HP-7 5 are echoed by the modem, the modem copies the commands or data from the transmit buffer into the receive buffer for t'lOD I t'~$ to read. When the modem reports a response (BUSY, CONNECT, etc.), it places the response into the receive buffer for t'l 0 D I t·~ $ to read.
Adapting Existing Programs to Use the Modem
Existing programs that perform data communications with the HP-75 are designed to work with an
HP-IL peripheral, such as the HP 82168A Acoustic Coupler or the HP 82164A HP-IL/RS-232C
Interface connected to a modem. The modem provided in the HP 82718A is not an HP-IL data communications peripheral; rather, it is a dedicated internal device, just as the card reader is not an
HP-IL mass storage device. Therefore, commands that deal with HP-IL peripherals cannot be used for the modem, and loop configurations and loop protocol are irrelevant to the operation of the modem.
When changing a program that uses HP-IL peripherals to one that uses the modem, there are five areas that need attention:
I) Core input and output commands
2) Device-specific command syntax
3) Status conditions
•
4) Modem power
5) Additional modem features
CORE INPUT AND OUTPUT COMMANDS. Existing programs use either Et·H I 0$ and !::Et·m I 0 from the HPILCMDS LEX file (which exists by itself, in the HP-75 Data Communications Pac, and in the
HP-75 I/O ROM), or Et·HEF.: and OUTPUT (in the I/O ROM only). You need to replace those core input and output commands with t'lOD au and t"IODOUT, respectively. Usually, this is a direct, straightforward replacement; for example,
D$=EtH10$( II: I 111 ~ IIUt'~L, TAD#~ !::DA II ::'
SEt·m I 0 II: 1111 , II Ut'~L ~ LAD# II ~ D$ from the HPILCMDS LEX file, or
Et·HEF.: II: 1111 ; D$
OUTPUT 11:11 11 D$
l an
32C
:lata
: an for reas dem the
: ~,~ $
,pies the for rom the
;ore
'ect,
Software Usage and Examples from the I/O ROM become
D:t=t'10D I ~,U t'10DOUT D$
DEVICE-SPECIFIC COMMAND SYNTAX. The device-specific commands that HP-IL devices recognize are different than those used by the modem. The modem has a set of low-level commands that are functionally equivalent to HP-IL remote mode instructions, but use a different syntax. For example, to instruct the HP 82168A Acoustic Coupler to set even parity, ENQ/ ACK protocol, and clear its buffers, the following would be done with HPILCMDS:
S E t·m I 0 II: I 1 " , "U t·~ L, F.: E t·~, LAD # " , "P [1; C 1 ; P;" I~
::;
E t·m I 0 ""," t·W E " , " " or with the I/O ROM:
REt'10TE I~ OUTPUT ": Ii"
II
PO; C 1; P;" I~ LOCAL
The equivalent modem command sequence would be as follows: t'10DOUT "~'~F '::'171':'~~Q"'"
..... ,_I
7" o:~.r·HP$'"
1_ •• _' ", "
1':' ",
,_I " where
Q
(~J) and § represents control-S (~~).
Other remote mode instructions are converted similarly. The dIscussion of low-level modem command usage later in this section and the "Low-Level Modem Command Dictionary" explain the low-level modem commands. Refer to the owner's manual for the device in question for information about its remote mode instructions. For convenience, here is a table that lists those low-level modem commands which have equivalent remote mode instructions for the HP 82168A and HP 82164A.
Low-Level
Modem Command
B (BREAK)
F (FORMAT)
K (KONTROL)
T (TEST)
Z (ZAP)
Remote Mode Instructions
HP 82168A
B
P
C
T
R
HP 82164A
B
P
C,DE,FC,LC,PC,SP none
R
STATUS CONDITIONS. HP-IL peripherals identify status conditions with One or more status bytes. The program takes different actions based on the value of those status bytes. Th~ status bytes are read by requesting status:
17
18
Software Usage and Examples
!;:;$=Et·n I 0$ ( " : 11" , "Ut'~L, TAD#, !::;!;:;T II ::. or
S$=!:WOLL$ (
II :
1111 ::.
The modem status is identified by certain high-level modem commands, by the low-level Q (QUERY) command, and by other responses that the modem places in the receive buffer. The A"/A I L'~',
CAF.:F.:IEF.:?, FF.:At'1E?, F'AF.:I T'l?, and F.:EAD\'? all have functional equivalents represented by the values of the status bytes. Some of the status information reported by the Q command and the modem responses have equivalents in the status bytes. Refer to the owner's manual for the device in question for information about its status bytes.
The areas of your programs that detect and act on status will have to be modified to use the status reporting mechanisms provided by the modem. Refer to the Sections 3 and 4 and to "Reading Modem
Responses" later in this section.
MODEM POWER. You must modify the program to turn the modem on and off using t'lODEI"l OF F. If your program powers down the loop (e. g., !;:;Et·m lOll: I t'10DEt'1 ot·~ and
111 , II Ut'~L, LAD#, LPD,
TL+II, 1111), you can replace that with t'10DEt'l OFF. The proper use of t'10DEt'1 ot·~ will be discussed in "Turning the Modem On".
ADDITIONAL MODEM FEATURES. The modem offers features that you may want to incorporate into your program. Dialing, answering incoming calls, detection of busy signals, etc. are just some of the new features available to you. You will need to study the features of the modem and decide which of them you want to integrate into your application. t
HI
Tn fr< hi w1
Ir
1 s t
T d t1
I
•
md
D,
.sed
.nto lew lem y)
,
:he em for tus em
Software Usage and Examples
HIGH-LEVEL MODEM SOFTWARE
The high-level modem software provides the ability to turn the modem on and off, transmit strings to and from the modem, and check the status of the modem. This section will illustrate the use of some of the high-level modem commands. (The strings sent to the modem can contain low-level modem commands, which are described in the "Low-Level Command Dictionary" and illustrated later in this section.)
Initializing the Modem
The HP-7 5 and the modem are initialized independently of each other, just as the HP-75 and an HP- IL data communication device are initialized independently. If the HP-7 5 is reset ( [SH I FT] [CTL] [C LR]), the modem is not. Similarly, if the modem is reset (ItH T I FIL I ZE II: t'1ODt'1"), the HP-75 is not.
The modem can be reset to its default state by executing I t·~ I T I AL I ZE II: t'1ODt'1 11 . The modem software resets the modem automatically if there is insufficient battery power in the HP 8271 8A. Since this reset occurred without your intervention, you are warned about the initialization with EF.:F.:OP:
ModeM cold start.
Turning the Modem On
Turn the modem on by executing t'10DEt'1 otl After you turn it on, you should wait about 5 s for the modem to become ready for use while it performs a self -test. In principle, you can tell if the modem is ready by reading the modem input buffer with t'10D I tU until the roOK message is received from the modem:
1 0 t'1 0 D E t'1 0 t·~
20 IF t'lOD Hl$#
II
~·~OK
II
THEt·~ 20
However, there are two pitfalls in using this approach:
1) The %OK message will only be reported if the modem is reporting long responses. If the modem is reporting short responses when it is turned on, %4;, (%4 followed by a space) is the equivalent of%OK
(see appendix D).
2) If modem is already on, t'10DEt'1 CII··1 has no effect, and no %OK or 104! will be reported.
Here is a routine that will turn the modem on, wait until it is ready for use, and avoid these problems as well:
10 MODEM OFF ~ MODEM ON
20 t'l$=t'lOD Hl$
! Turn off the ModeM in case i t is on
17
18 !
19 I
Look for either %OK or %4~
II! IF t'l$#
II
~'~CIf:::
II
At·m t'l$#
II
~A THEt·~ 20
Note that line 20 cannot be the following:
19
- - - -
------~--
Software Usage and Examples
20 IF t'lOD I ~'4$#
/I
~·~OK
/I
A~·m t'10D I ~'4$#
/I
~'A THE~'4 20
The first t'1OD t'lOD H4$ would read the buffer and empty it, comparing the data to %OK. The secona
I N$ would not have any data to read. Consequently, whenever data appeared in the buffer, it would be examined to see if it contained %OK or %4;, but not both.
If you know that the modem is reporting long responses (the default behavior), the simplest routine is:
10 MODEM OFF ~ MODEM ON
20 IF t'10D H4::t#
/I
~·~OK
/I
THE~'4 2(1
If short responses are known, substitute %4 for %OK.
This is almost the same as the original "obvious" approach to waiting for the modem to be ready. As you now understand, there are two reasons it works: (1) the modem was off before it was turned on, and (2) the modem is reporting long responses. There are actually two additional reasons it works. These will be discussed under "Reading Modem Responses."
If you always want to force the modem into a known state, you can use the following routine.
I ~.~ I T I AL I ZE
/ I : t'1ODt'1/1 takes about 18 s to execute, and then turns the modem off.
10 UU T I AL I ZE
/ I : t'10Dt'1/1 I~ t'10DEt'1 ot·4
20 I F MOD I H~ttf
/I
~·~OK
/I
THE~'4 20
Detecting Connection With a Host Computer
Once the modem is on, and a number has been dialed, the connection with the host computer needs to be detected. The example below uses CAPf::: I EP? for this task.
10 t'10DOUT
II
~'~d 1 (:::00) 555-1212/1 :~.:CHP::t.:: 1:::::' ! D i .:.1 t. he nur'lbet-
17 !
18
I
If carrier not. found aft.er 80 s, halt the prograM
19
I
20 Ot·4 T H1EF.: # 1, :::0 D I ::;P
/I
~'40
80 IF NOT CAPRIER? THEN 80 ! connect. i on
II
I:E!
STOP
Loop waiting for carrier
40 OFF TIMER # 1 ! When carrier found, st.op the t.iMer
5(1
[I
I SP
/I
Connect. i on est ab 1 i shed
II
The program dials whatever number is specified on line 10. Note that the parentheses and dash in the dial string improve readability but do not cause an error. The program then loops on line 30 waiting for a carrier to be detected.
A timer is set on line 20 to halt the program after 30 s of waiting for the carrier. The 30 s includes the time it takes the modem to process the dial command and actually perform the dialing. If pulse dialing or
20
;ond r, it the for the
: or you the
I be me.
) be
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 i f 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
27
If off-hook~ no carriE'r~ halt prograM
I f on-hook ~ i.,.I.::J it. i n'd f ot- can- i et-, loop
28 I f 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.
State
1+HooK?+
HOOK? CARRIER? CARRIER?
On-hook
Off-hook, waiting for carrier
Carrier detected
Carrier not detected (back on-hook)
0
1
1
0
0
0
1
0
1
2
3
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
Software Usage and Examples
Reading Modem Responses
Frequently when using the modem, an application program will use t'10D I tH: to read modem responses
(CONNECT, OK, etc.) for two reasons: to establish if a certain condition has occurred, or to remove the modem response from the incoming data stream. A single t'10D I t·~~:. may not read all the characters of a response at once-you may need more than one t'10D I t·U to collect the entire response. To collect the response, use a general purpose subroutine such as the one below:
1 (1(10 t'1$=
11 11
1 (106
!
Initialize scratch variable
1~X17
1 (1(1:3 I
Look for the string to be found, successive MODIN$s and searching
10(1'3
I
1010 M$=M$&MODIN$ e
IF NOT POS(M$,F$) THEN bl::l accur'lU l.:=it. i n'd
F$.
1010 ELSE RETURN
This subroutine is called by passing it the string to be found in F$. For example, to find %CONNECT, the calling sequence is:
This calling sequence will only determine if a connection has been made. If you want to remove the response from the incoming data stream, you need to know the full sequence of characters for a
~~~f:;t:::u;:~~o~:~ ~!c~~e~CONNECT ~R :~t
%OK
~~ :~t
(long responses onlY---4lee appendix D). The •
10 E$=CHR$ ( 1 :::) &CHR$ ( 1
(1::' I~ F$=E$:~.:
11
~·~COt·mECT
11
2(1 GOSUB 1000
:~.:E$:~.:
11
\OK
11 t:E$
This subroutine can also be used when the modem is turned on by setting F $ to r,OK for long responses or
%4[,m short ones. The last two examples under "Turning the Modem On" would become:
10 MODEM OFF e
MODEM ON
20 F$=
II
~·~OK
II
I~ GO:::UB 100(1 and
1
[I
I HIT I AL I ZE
11: t'10Dt'1 11 e
2(1 F$=II~·~OKII I~ GOSUB 1
(1
(HZ1 t'10DEt'1 ot·~
22
In that same section ("Turning the Modem On "), there were two reasons listed why line 20 of the previous example can be simplified to IF t'10D I t·U#
11
~·~OK
11
THEt·~ 20. There are two more reasons as well.
First, when the modem is turned on, the long response is %OK, not r,OK ~~ ,~t (see appendix D). Second, only when the modem is turned on, any response (long or short) will be read ina single t'1OD I t·U.
•
r
Software Usage and Examples responses _ move the cters of a
:lIlect the
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".
NECT, the move the
!rs for a
D). The
~
;ponses or
: previous s as well.
Second,
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
When t'10DOUT has ended. 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
Software Usage and Examples
MODOUT and Out of Memory
As t'10DOUT places echoed data into the HP-75, t'10DOUT will use as much memory as it needs, until there is no more memory available. As long as it has data to transmit, t'10DOUT will continue to read data from the receive buffer to prevent it from overflowing. However, all the echoed data that is read after the HP-75 runs out of memory is thrown away, since there is no place to put it.
I
In the previous example, if the HP-75 ran out of memory after thi,
s is sam
would be lost. The next t'10DOUT would empty the buffer, and would read pie before running out of memory and losing more echoed data. If echoed data is important to you, make sure you have sufficient memory available for it, and read it as soon as it appears.
If you need to know how much data is saved by executing t'10DOUT, save the available memory (use t'lEt'l) before t'10DOUT, and compare that with the available memory after executing t"IODOUT (e.g., t'l= t'l Et'l I~ t'10DOUT D$ I~ D I ::;p t'l-t'lEt'l;
II b';::It
€-S s.:3' .... E·d b'::1 t'10DOUT")
I
24
Retransmitting Received Data
t'10D HU reads the data from the modem receive buffer, and copies it into the HP-75 buffer behind any data that may already be there from t·10DOUT. Because t'lODOUT clears this buffer before it does anything else, the statement t'10DOUT t'10D HU will not retransmit the data just received by the modem-it will retransmit random, unknown data. If you need to retransmit received data, you could use t'"I$=t'10D I t'~$ I~ t'1CIDOUT t'l$, but this requires t'1:t to be dimensioned large enough to hold the input string, A better solution is t'10DOUT I'KID I t,U:~,:" ", which requires no variables to be dimensioned.
If you use t'1CIDOUT t'1CID I t'~$:~,:
II II to echo received data back to the host, you should be aware of the possibility of getting into an infinite loop. This may occur because more than just data appears in the receive buffer-responses also appear, and those responses can set up an infinite loop. For example, if the
%CONNECT response is retransmitted, the modem will interpret it as %C, the COUNT command. The modem expects to see %C, a space, a number, and a carriage return.
Since ';CONNECT followed by carriage return is not a valid syntax for the C command, the %ABORT response would be reported by the modem, and placed in the receive buffer. Upon retransmission, that response would be interpreted as %A, the ANSWER command. It would be processed correctly, but its response could be %BAD ANS, causing %B, the BREAK command, to be retransmitted with invalid syntax, resulting in %ABORT.
The situation soon becomes unwieldy. When you retransmit received data, be sure to strip out all characters of modem responses. To facilitate this, the exact sequence of response characters is given in appendix D.
Terminal Program
Any terminal program, when stripped to its bare essentials, must perform three operations:
1) Read input from the keyboard
2) Transmit the keyboard input to the host
3) Display data received from the host
•
il
.d
Ld xt re it, re g., ny
Jes
;he lId the be the the the lem
:)RT
.hat its tax, all n. in
Software Usage and Examples ,
Here is the simplest terminal program that does all three operations:
1 [1 t'1O D E t'1 ot·4
2[1 MODOUT KEY$ ~ DISP MODIN$; ~ GOTO 20
(Assumptions that allow this to work are: the modem is in its default state with command echoing enabled
(E 0) and data echoing disabled (G 0),
~HDTH is avoid long delays after each D I ::;p is executed.)
H4F to avoid spurious
GR
.bis,
and DELA'y' is zero to
................... .
Line 10 turns on the modem. If the modem is on, line 10 has no effect. t'10DOUT KE\'$ gets the ASCII character for any key pressed and sends the character to the modem. The character is put in the modem transmit buffer. If the character is the command character, the subsequent characters typed will be treated as part of a low-level modem command, until the command is terminated by a carriage return.
D I SF' t'1OD I t·4$ displays anything in the modem receive buffer. The semicolon (;) inhibits the ~R l.iF after the D I ::;p statement; without it, each block of characters read by t'10D I t·U would appear on a separate line. GOTO 20 repeats this sequence forever.
There are three things that can appear
In the receive buffer: 1) modem responses, 2) echoed low-level commands, and 3) incoming or echoed data. Responses always appear in the receive buffer. They can only be shortened using the L (LONG) command-they cannot be suppressed entirely. Low-level commands can be echoed either by the modem or by the terminal program. The host cannot echo the commands because they are processed locally by the modem and not transmitted to the host. If command echoing has been enabled (E 0), the modem will do the echoing. If command echoing has been disabled (E
1), the terminal program must do the echoing by using D I SP K$ to display everything typed:
1
[1 t'10D E t'1 ot·4 I~ t'10DOUT
II
~':E 1
II
:~.: CHF.:$'::
2[1 K$=KEY$ @ MODOUT K$ ~
1::: ::.
DISP K$;MODIN$; @ GOTO 20
Data can be echoed by either the host computer, the modem, or the program. If data echoing has been disabled (G 0), the host is expected to echo the data. If data echoing has been enabled (0 1), the modem will echo the data, regardless of the action of the host. If neither the host nor the modem is echoing the data, the program must do so (D I ::;p K$).
These different approaches to command and data echoing are summarized as:
Host echoes
Modem echoes data commands nothing commands and data nothing nothing
Program echoes nothing nothing commands and data
Modem parameters
0 O,E 0
G 1 , E 0
G O,E 1
Terminal program
DISP MODIN$;
DISP MODIN$;
DISP K$;MODIN$;
25
26
Software Usage and Examples
These three approaches are the simplest to use in a terminal have the program echo only data or only commands. program. A more difficult approach would
For this, the program would have to examine command starts with the command character everything read from the keyboard. Since a low-level
(usually ~) and ends with a carriage return, those characters would be stop echoing by the program. If the program echoes only used to determine when to start and the data, then the modem must echo the commands (E 0). If the program echoes only the commands
(E 1), then either the host (G 0) or the modem (G 1) can echo the data.
•
L
Tl di c(
0] pi
You can extend this simple termmal program in dozens of allow editing of it, screen out editing characters (such as ways. It could buffer up all keyboard input, backspace), and send it all to the modem when
[RTN] is pressed. It could recognize special characters that would drive automatic logon and logoff with an autodialer program that looks up sequences, or begin file transfers. It could work in conjunction and dials phone numbers based on the name of the party being called. b
1
"
The simplest terminal program is explained here because it is an invaluable learning tool for used in conjunction with a second HP 82718A. understanding how to use the HP 82718A modem when
This procedure is described in "Connecting Two Pods Back-to-Back" later in this section.
•
Jt, en
)ff up for
IA. id le
~r ld
1e tle
Software Usage and Examples
LOW-LEVEL MODEM SOFTWARE
The low-level modem software provides the ability to directly control the modem for operations such as dialing, changing modem operating modes, and setting handshake protocol and parity. All low-level commands are sent to the modem using the high-level t'10DOUT command. This section will describe the operation of the modem and examples of the use of its commands. The examples assume that you program has turned the modem on (see "Turning the Modem On" earlier in this section).
Modem Modes
The modem has four primary operating modes that directly affect its operation. These are described below:
Mode
MODEM
VOICE
ORIGINATE
ANSWER
Description
MODEM mode is the data communication mode of the modem. In
MODEM mode, the modem is waiting for either a dialing operation or a ringing signal. If a dialing operation occurs, the modem is originating the communication session. It will then monitor the phone line for a ring back from the remote modem, and attempt to enter ORIGINATE mode. If a ringing signal occurs, a remote modem is trying to initiate a communication session. The modem will then attempt to enter ANSWER mode and answer the incoming call.
VOICE mode allows you to use the modem as an auto-dialer for voice communication. The modem is not monitoring the status of the phone line for either a ring by a remote phone or for incoming calls, and performs none of the data communication activity that occurs in MODEM mode.
The modem is issumg an originate tone or waiting for an answer tone.
The modem is issuing an answer tone.
The modem can also be off-hook or on - hook, analogous to a telephone. When a phone handset is in use, it is off the hook-using the phone line. When a phone handset is hung up, it is on the hook-not using the phone line. Similarly, when the modem is off -hook, it is using the phone line, and when the modem is on-hook, it is not using the phone line.
When the modem is on-hook, it can be either in MODEM mode, waiting for a dialing command or an incoming call, or in VOICE mode, not monitoring the phone line. When the modem is off -hook, it can be in ORIGINATE mode, waiting for a ring back from a remote phone or an answer tone, in ANSWER mode, waiting for an originate tone, or in VOICE mode, not monitoring the phone line.
Virtually all high-level modem commands are geared toward use with MODEM mode. Detecting carrier and on-hook/off-hook status (CF-IF.:F.: I EF::? and HOOK?) are relevant to establishing a communication session. Reading from and writing to the modem buffers (t'10D I t·U and t'1C!DOUT) is relevant to VOICE mode only because t'10DOUT sends the commands and t'1C!D I t·U reports the responses to the commands.
27
b
Software Usage and Examples
Checking the buffer status
PAF.: I T\'"7')
(A"'·' A I L? and
PEAD'l?)
and looking for data errors are only pertinent to data transmission.
(FPAt'1E?
and
I
t·~
I T I AL I ZE ": t'10Dt'1"
forces the modem into
MODEM mode.
Most low-level commands are geared toward MODEM mode as
VOICE mode are V (VOICE-puts the modem into VOICE mode),
well. The three that explicitly support
P (PICKUP-takes the modem off-hook and enters VOICE mode), and X (XMIT--dial a phone number without listed below with a brief description of their behavior as it pertains call progress reporting after dialing).
These are described in the "Low-Level Modem Command Dictionary".
All the low-level commands are to MODEM and VOICE modes.
Low-Level
Command
A (ANSWER)
B (BREAK)
C (COUNT) o
(DIAL)
E (ECHO)
F (FORMAT)
G (GIVEBACK)
H (HANGUP)
I (INITIALIZE)
K (KONTROL)
L (LONG)
M (MODEM)
N (NEW) o (ORIGINATE)
P (PICKUP)
Q (QUERY)
R (REDIAL)
T (TEST)
U (UNLISTEN)
V (VOICE)
X (XMIT)
Z (ZAP)
Behavior Relative to MODEM and VOICE Modes
Forces MODEM mode
Only occurs if carrier present
Ignored in VOICE mode
Line monitoring for carrier and ring only relevant
Command echoing can occur in MODEM and VOICE modes
Parity only relevant during data transmission
Data echoing only relevant during data transmission
Hangs up modem in MODEM and VOICE modes in MODEM mode
Forces MODEM mode
Handshaking only relevant during data transmission
Responses can occur in MODEM and VOICE modes
Forces MODEM mode
Commands can be sent in MODEM and VOICE modes
Forces MODEM mode
Forces VOICE mode
Status can be requested in MODEM and VOICE modes
Line monitoring for carrier and ring only relevant
Tests can be performed in MODEM and VOICE modes
in MODEM mode
Commands as data only relevant during data transmission
Forces VOICE mode
Dials numbers in VOICE mode only
Buffer can be cleared in MODEM and VOICE modes
Modem Parameters
In addition to the modes just described, the modem has several can be altered by low-level commands. The parameters and parameters that affect operation and that the low-level commands that set them are shown in the following table:
•
28
e t k
I.
'e
Software Usage and Examples
J
Parameter
Ring count
Command echoing
Parity and data length
Data echoing
Handshake protocol
Response length
Command character
Command
C (COUNT)
E (ECHO)
F (FORMAT)
G (GIVEBACK)
K (KONTROL)
L (LONG)
N (NEW)
The current values of these parameters are preserved by the modem when it is off, except for the command character, which is always set to ~ when the modem is turned on.
Default State
The table below describes the default state of the modem. The first column is the parameter or state of the modem. The second column shows the default state that is set when the modem is initialized. The third column is the equivalent low-level command that would have to be executed to produce the same effect on the modem. The last column shows which parameters and states are preserved while the modem is turned off. Those that are not preserved revert to their default values when the modem is turned on. hat are
Parameter or Mode Default Condition
Ring count
Command echoing
Pari ty
Data echoing
Modem hung up
Handshake protocol
Parity stripped
Chars stripped
Block size
Handshake chars
Response length
MODEM or VOICE mode
Command character
Transmi t buffer
Receive buffer
Cmd char is data
(UNLISTEN) o yes none no yes
Transmitter XON/XOFF
Receiver XON/XOFF
Receiver ENQ/ACK no none
32 bytes
QSQSQ long
MODEM
% cleared cleared no
Equivalent Low-
Level Command
Note: ~ represents control-Q (0<:1) and? represents control-S (OC3)
C 0
E 0
F 4
G 0
H
K E03QSQSQ
L 0
M
N
% none
Z none
Preserved
Hhile Off yes yes yes yes no yes yes yes no no no no
"
29
-
Software Usage and Examples
Modem Responses
Modem responses identify certain conditions of modem operatlOn. All modem responses, which are placed in the modem receive buffer for t'10D I t·u: to read, are preceded by the command character to allow you to distinguish between the responses and incoming data. The L (LONG) command specifies whether the responses are to be long or short. Long responses are spelled out, and short responses are a single hex digit
The responses, in the two lengths, are:
•
Long Short
Response Response
ABORT
BAD ANS
BUSY
CONNECT
CONN LOST
FAIL
NO ANS
NO DIAL
OK
OV
RING
RING IN
3
4
OV
5
7
1
8
9
2
A
B
0
See appendix D, "HP 8271 8A Errors and Responses", for the meanings of the responses, commands that • report them, and the exact sequence of characters that will be reported.
While you are developing and debugging applications using the modem, the long responses are useful to help monitor what is going on, and are self -documenting as well. In the final version of an application, short responses are preferable. Data from the phone line and responses generated by the modem cannot be put in the modem receive buffer simultaneously. When a response is placed in the buffer, the incoming data flow is halted for the time needed to put it there. There is a possibility of data loss because of this, depending on how fast the host is transmitting. Short responses reduce this time interval and the possibility of data being lost; in addition, the program length will decrease slightly, and the program will be able to process received data slightly faster.
Low-Level Modem Command Syntax
All low-level modem commands begin with a command character so the modem can distinguish between data to be transmitted and commands to be processed. Also, when the modem reports a response, it puts a command character before the response so you can distinguish between responses and incoming data.
30
The default command character is %, but you can change it to something different using the N (NEW) command. When the modem receives the command character from the HP-7 5, it interprets all characters received between the command character and a carriage return as commands. The general syntax of a • low-level modem command is as follows: the command character, any number of commands (together .. with their parameters) separated by commas, and a carriage return. The carriage return may be preceded by a comma if the comma is preceded by a recognized command. This syntax is shown below; symbolizes the command character (usually ~), and qB the carriage return. eM
•
lced you the igiL
Software Usage and Examples eM
command[,command,
0"
,command]
~~ or
~M
command [ , command, ... , command],
~~
For a single command, this simplifies to
9.M
corrm:::md
~R. Some examples are shown below:
{ %G a,E 1 ,F 3,A
PR
%G a,E 1 ,F 3,A,9ft is that eful to ication, cannot
'er, the because and the am will between it puts a tao j
(NEW) h.aracters ltax of a
(together preceded elow;
PM
Two characters will abort the command string if they appear anywhere between the ~M and the
tR:
(backspace-ASCII 8 or control-H) and
~AN
(cancel-ASCII 24 or control-X). All characters after the
!~$
:ij$ or 9~~ and before the 9.~ will be ignored (neither executed nor transmitted).
NOTE
If you incorrectly type a low-level modem command using a terminal program, the modem will respond with \ %ABORT followed by %OK (or \ "/.A followed by %4 for short responses). The modem will continue to treat all subsequent characters as part of the aborted command until it receives a carriage return. Therefore, if you type a low-level command incorrectly, press [RTN] before trying to repeat the command.
Each command consists of the command name followed by any parameters. The exact syntax of each command is listed in the "Low-Level Modem Command Dictionary". Commands can be upper- or lowercase. If a command requires a parameter, all characters from the first character of the command name up to the first space are ignored. For example, several equivalent representations of the G
(GIVEBACK) command are:
G 0
GI 0 giveback 0
GivethedatabacktotheHP-75 a
If you need to send the command character as data, see "Sending Command Characters as Data" later in this section.
Software Handshake Protocol
Software handshakes are used for controlling the flow of information between the modem and another computer. They prevent problems that could arise from the increased use of time-sharing and multitasking on computer networks. If the remote computer is temporarily busy, it needs a method to
31
L
32
Software Usage and Examples notify other devices on the network that they need to wait.
Software handshakes can also prevent such problems as data being lost because the host is busy or a buffer is overflowing.
The K (KONTROL) command allows you to define the software handshake protocols expects eight single-byte parameters identified as
~9.-~8. for the modem.
Protocols are specified using the
K
It command, as described in the "Low-Level Command Dictionary", and are defined in this section.
• t f
Is t
ENQ/ ACK PROTOCOL. ENQ/ ACK protocol is used by the primary transmitting device (host) to control the transfer of data to the receiving device (terminal).
Typically, the host device is a computer; the terminal device is a remote terminal or peripheral. ENQ/
ACK protocol is used for batch, or block, information transmission with either full or half-duplex devices.
If the host is ready to send data to the terminal, the host sends ready to receive a block of data. When the terminal is ready, an ~~9
(enquire) to check if the terminal is it sends an
~qK
(acknowledge) to the host, t::NQ. This cycle is repeated as required by the host. and the host transfers one block of data and another l;:~9 is called the request character, and
ACK
is called thecmswer character. terminal by using Receiver ENQ/ ACK Protocol (bit 1 of fixed to be
~~g (ASCII 5) and
~g~ (ASCII 6).
. ..... .
ENQ/ ACK Protocol (bit 0 of
Bf set), or a
The HP 82718A modem can be a host by using Transmitter
K1.. set). The request and answer characters are
XON/XOFF PROTOCOL. XON/XOFF protocol is used by the receiving device to tell the transmitting device when to start and stop sending. XON/XOFF protocol is mainly for character rather than block if desired. XON/XOFF protocol requires transmission; however, block transmission can be used full-duplex devices and operation. Both devices can be using XON/XOFF protocol to control data that they're receiving.
With XON/XOFF protocol, the receiving device monitors its receive buffer. When the buffer is close to being full (or close to not being able to accept another block), off) the receiving device sends an to tell the sending device to stop sending. The sending device then suspends data
~Qff: (transmit
transm~ssion
until the receiving device sends an
The sending device then resumes sending, starting with
X9Fr was received.
X~ the character that was next to be sent when the ready character, and
~9rr (ASCII 19, or
P9~) is called the not ready character.
~j) is called the
I
I
~
The HP 82718A modem can be the primary transmitter by of ~;1 set), or the primary receiver by using Receiver XON/XOFF transmitter, it uses
~.1 as the ready character and
K!5 as the ready character and
'*4 using Transmitter XON/XOFF Protocol (bit 3
Protocol (bit 2 of
KJ set). When a
~p as the not ready character. When a receiver, it uses as the not ready character. You can define these protocol because some computer systems (e.g., Dow Jones News/Retrieval characters
Service) reverse the sense of the ready and not ready characters.
PROMPT MODE. The host is presumed to have infinite input capability, so that the terminal can send data to the host without using any software handshakes and without observing the block size-that is, the it wants. Because this situation is not always terminal can send any amount of data to the host any time practical, a host may control this type of transfer using a prompt to accept data, it sends a prompt character to the terminal. character. Whenever the host is ready
The terminal then sends one line of data to length is not related to the block size.) the host. (A line of data is terminated by a carriage return-its
The host sends another prompt when it's ready for another line.
If the modem is acting as a host (Transmitter ENQ/ ACK Protocol), is, the modem doesn't automatically prompt the external it never uses a prompt character. That • device for data. However, you can program the
Software Usage and Examples
1ch
It
., as
HP-75 to send an appropriate prompt character to the external device via the modem. For example, the
HP-75 can check the receive buffer for a carriage return while it is reading in data with t'10D HU, and then send the prompt when it is through processing the line.
If the modem is using Prompt Mode (bit 3 of K~ set), the prompt character is defined by
K1.
The modem stops sending data to the host whenever it sends a carriage return. If it finds a ~1 character, and ~.q is not the same as the
K15, the modem will also strip off any K~ characters received between the carriage return and
K1 character. If the modem is not set to use a prompt character (bit 3 of K~ clear), then it doesn't wait for a prompt before sending data and doesn't stop sending data after a carriage return. Prompt Mode has higher priority than Transmitter XON/XOFF Protocol. trol the
:)ck, il is lost,
.ost.
COMBINED PROTOCOLS. Some devices use both ENQ/ ACK and XON/XOFF protocol. This enables them to initiate the transfer of data according to ENQ/ ACK protocol, and to stop and start the transfer as required by the receiver.
When the HP 82718A modem uses ENQ/ ACK and XON/XOFF protocols together, it operates according to both of these protocols as described above, with one exception. Prompt Mode and Transmitter
XON/XOFF Protocols cannot be used simultaneously because they both use the K~ and
K$ characters.
Therefore, if the modem is using Transmitter XON/XOFF Protocol, Prompt Mode should be disabled-if both protocols are enabled, Prompt Mode has priority. ling lock
1ires that
,e to smit llntil with
I the bit 3
.en a uses
.cters
'eady send s, the
.ways ready cta to size. )
That n the wi
Buffer Control
The modem monitors the number of data bytes in its receive buffer to determine when to halt transmission from the remote device by sending the appropriate software handshake character. By not allowing the external device to send data until there is enough room in the buffer for the next block of data, the modem can prevent the loss of data.
For ENQ/ ACK protocol, the host normally sends data to the terminal in blocks followed by an ;~Q. The modem's receive buffer can hold up to 64 bytes. If the modem is using Receiver ENQ/ ACK Protocol, the modem will not send an ~~~ until t'1 OD HU: empties the receive buffer.
If the modem is using Transmitter ENQ/ ACK Protocol, then the external device will be expecting to receive data in blocks that it can handle. If the external device is expecting a block of data of 40 characters, for example, then the modem will send its data in blocks of 40 characters, each followed by an
ENGl. The modem will not send out another block until it receives an
AcK
The block size used by the modem with Transmitter ENQ/ ACK Protocol is 8 to 64 bytes, in 8-byte increments. The block size is specified in bits 2-0 of ~~: Refer to the owner's manual of the external device to determine the block size required.
For XON/XOFF protocol, the device that is sending data will continue to send data until it receives an
~Qfr. The device may send a block of data before it can actually stop sending. Thus it is important to reserve a block of empty bytes in the receive buffer that is large enough to accept the maximum block that the external device may continue sending upon receiving an
XPf.f.
If the receive buffer overflows, received data is ignored until the number of bytes in the receive buffer drops below 56. Then the buffer overflow response (OV) is placed in the buffer, and receiving continues.
When the modem is using Receiver XON/XOFF Protocol, it counts the number of bytes in its receive buffer. When it has received a number of bytes equal to the block size, the modem sends an ~.or-jt:
(actually, a J,Sj character). An
~q~
(actually, a
K~ character) is sent after t'10D I t'~$ empties the receive buffer.
33
Software Usage and Examples
The block size used by the modem with Receiver XON/XOFF Protocol is 8 to 64 bytes, in 8-byte ~' increments. If the external device may send 16 characters after receiving an ~9tf, for example, then the block size can be any value of 64-16=48 bytes or less without risking loss of data. The block size is specified in bits 2-0 of K~.
When the modem is using Transmitter XON/XOFF Protocol, it will send a maximum of 3 characters after it receives an ~9:ft (actually, a .1<.5 character).
Modem Deadlock
Modem deadlock occurs when the modem transmit buffer is full, but the modem cannot transmit the data out the phone line to the host computer. If the transmit buffer is full, the HP-75 cannot send any commands or data to the modem, since everything sent to the modem by t'10DOUT is placed in the transmit buffer for processing. The modem cannot send the data and thus empty the buffer, and cannot accept anything from the HP-7 5 until the buffer is empty, hence the term deadlock.
The situations that can cause deadlock are as follows:
1) The host computer is not ready to receive data. This could be because of multitasking, time-sharing, slow data communications software, or any of a variety of reasons.
2) The modem is using a handshake protocol that disables data transmissions until a certain character is received from the host computer (or terminal if the HP-7 5 is the host). If the host does not send the character, data transmissions will not be resumed. The applicable protocols are Transmitter
XON/XOFF, Transmitter ENQ/ ACK, and Prompt Mode. t'10DOUT waits until the transmit buffer is ready to accept data before sending anything to the modem.
If the modem is deadlocked, t'10DOUT will wait forever. Once t'10DOUT starts to wait, you can halt it by pressing [ATTN] (a low battery condition in the HP-75 will halt it as well). You can then only use high-level modem commands to clear a deadlock. I t·~ I T I AL I ZE ": t'l0 Dt'lII will reset the modem to its default state, thereby clearing the deadlock. t'10DEt'l OFF or turning the HP-75 off will end the data transmission; when the modem is turned back on, the deadlock condition will be cleared.
Because the transmit buffer is full, no low-level modem commands can be used to clear a deadlock condition. In particular, I (INITIALIZE) will not reset the modem to its default state, K (KONTROL) will not change to a different handshake protocol, and T (TEST) will not perform the power-on test and clear the buffers.
If you anticipate a possible deadlock, you should plan for this in your program. The PEAD\'? high-level modem command returns a 1 if the modem transmit buffer is ready to receive data from the HP-75, or a o if the modem is not ready, and thus identifies deadlock. If deadlock may occur temporarily because of delays by the host, your program could just wait for the deadlock condition to go away (F.:EAD\'?=l). If deadlock may occur because of handshake protocol, your program may only be able to use
I t·~ I T I AL I ZE ": t'10Dt'l" or t'10DEt'l OFF to clear the condition. If deadlock is of great concern, your program should only send one character at a time to the modem with t'lODOUT, waiting before each character is sent until F.:EAD\'? =1.
Adaptive Dialing
34
Telephone systems in the United States accommodate one (or both) of two alternate dialing schemes. The older scheme, used for rotary-dial phones, is called interrupt or pulse dialing. The newer scheme, used for
•
t.
Y
Ie o
,e k
,) ld el a
)f
If se n,
;h r
" r d r he or
Software Usage and Examples , push-button phones, is called Touch-Tone* dialing. In this manual, we will refer to these two dialing schemes as pulse or tone dialing.
Applications using the HP 82718A modem may involve transmitting or recelvmg data from different locations using different phone systems. A general purpose data communications program should be able to adapt automatically to the the characteristics of these phone systems.
Adaptive dialing is the process of identifying whether the phone system can accommodate tones, and using them if it can, or using pulses if it cannot. Adaptive dialing can be done in two ways: either the modem can do the adapting using the 0 (DIAL) command, or the data communications program itself can do the adapting using modem responses.
Adaptive Dialing Using the DIAL Command
When dialing with the 0 command, you can specify tone dialing, pulse dialing, or adaptive dialing. When the modem dials adaptively, the following occurs:
1) The first digit of the dial string is tone dialed.
2) If the modem hears no dial tone, all the remaining digits of the dial string are tone dialed as well.
3) If the modem does hear a dial tone, it assumes the phone system cannot accommodate tone dialing, so it pulse dials the entire number, including the unsuccessful first digit.
The difficulty in using this scheme with many phone systems arises when access codes are present. Access codes are the number or numbers you must dial from a phone to gain access to the outside phone system.
Business PBXs or switchboards typically require a single digit to be dialed. Before you can dial the number you want, you must wait for a new dial tone. Some phone systems require a sequence of access codes, with a new dial tone appearing after each access code is dialed.
Access codes cause problems when the modem adaptively dials because the dial tone is used to determine whether or not tones were recognized. Suppose the access code for a business is a 9, and the phone number to be dialed is 1 (800) 555-1212. To dial this adaptively, you would use the following command
(notice that the parentheses and dash do not cause an error in the dial string-they just improve readability); t'10DOUT
II
~'~D '3 1 (:::00) 555-1212
II
:~.:CHF.:$':: 1 :::)
Following the procedure above, the modem tone dials the 9. If it hears a dial tone, it will assume that the phone system cannot accommodate tones, so the entire number will be redialed using pulses. Since the 9 actually just attained access, the actual number dialed is 918-0055 (the phone system will ignore the
51212).
The time between dialing an access code and hearing the new dial tone varies greatly. Because of this variability from phone system to phone system (and even within a particular phone system), you cannot predict if the modem will interpret the second dial tone as meaning tones not allowed. Consequently, you cannot count on adaptive dialing using the 0 command to work in the desired manner with access codes.
*Touch -Tone is a registered trademark of American Telephone and Telegraph.
3S
Software Usage and Examples
If the phone systems you will be using do not have access codes, this approach to adaptive dialing will work fine. The modem would then switch to pulse dialing only if the phone system could not ,. , accommodate tones.
If access codes will be present in your phone systems, adaptive dialing should be done , using modem responses.
36
Adaptive Dialing Using Modem Responses
For adaptive dialing purposes, the significant aspects of the
0 command can be summarized as follows: P forces adaptive dialing as just described, W forces tone dialing, can disable the adaptive dialing behavior of the 0 command and I forces pulse dialing. This means you by using Wor I at the beginning of each dial string.
If you use W to force tone dialing, the modem will successfully dial both access codes and phone numbers of dialing on those phone systems which cannot in most parts of the United States. However, the problem accommodate tones still exists. The program itself must then adapt to the phone system by examining the modem responses.
If you use I to force pulse dialing, the modem will successfully dial both access codes and phone numbers lengthens dialing time, and requires that the user not use pulse dialing. However, pulse dialing nearly everywhere, since virtually all phone systems accommodate a telephone as a line monitor until the dialing is completed (see "Using a Telephone as a Line Monitor" later in this section).
If you use I to pulse dial the access codes, and W to tone dial the phone number, the modem will not misinterpret the second dial tone as meaning tones not allowed.
The modem can then dial both access system can accommodate tones), and dialing codes and phone numbers successfully (assuming the phone time will be short. However, some phone systems do not allow using both tone and pulse when dialing access codes and phone numbers. Consequently, if you have access codes, tone and pulse dialing should not be mixed unless you know the phone system being used allows it. a
. ,
A general approach to adaptive dialing that avoids all these follows: Dial the phone number using only tones. If the problems and minimizes dialing time is as modem responses indicate that tone dialing did not work, redial the number using only pUlses. This mimics the behavior of the 0 command, and allows the use of access codes without dialing wrong phone numbers. responds with a bad answer tone. Condition
BAD
The BAD ANS and NO ANS modem responses are used to identify the phone system characteristics.
ANS occurs under two conditions: (1) the modem hears a dial tone after dialing, or (2) the called
(1) phone means that the tones were not recognized by the phone system, so pulse dialing must be used. Condition (2) means that the tones or pulses were recognized by the phone system, but the answering modem is malfunctioning.
NO ANS also occurs under two conditions: (1) the modem hears no dialing, or (2) the called phone actually did ring, but there number of rings (the ring count
+ dial tone or an unsteady tone after was no answer after either the maximum
4, up to a limit of nine) or after 50 s have elapsed since dialing
Condition (1) means that the tones were not recognized by the phone system, but the dial tone has stopped, and the line is either dead or issuing the receiver off-hook sound. Condition (2) means that the tones or pulses were recognized by the phone system, but the answering modem is unavailable. ended.
When either BAD ANS or NO ANS whether the modem reported are reported, the distinguishing factor between conditions
RING first. BAD ANS (or NO ANS) by itself means condition more RI NGs followed by BAD ANS (or NO ANS) means condition (2).
(1)
(1), and (2) is and one or
If the program finds either condition (1) occurs. If
BAD ANS or NO ANS while it is tone dialing, it should redial using pulses if condition (2) occurs, it is a condition beyond the control of the program that
•
\Till not
)ne bers ling
19 is not
:cess lling lling
I not is as
~ did llows s: P you dial bers mot the
BAD
,hone
Ihone y the after mum nded.
Ipped,
1es or
(2) is me or lses if
1 that
Software Usage and Examples switching to pulse dialing will not correct. The program should ask the user what action to take if condition (2) occurs. If the program finds either BAD ANS or NO ANS while it is pulse dialing, it should ask the user what action to take, regardless of condition,
Dial Strings for Adaptive Dialing
Here is a more detailed explanation of the special characters that can be used in a dial string:
1) The special character P means wait for dial tone, then dial the next digits adaptively. If no dial tone is heard within 3-4.5 s, the NO DIAL response is reported. The first digit (only the first digit) after the P will be dialed using tones. If no dial tone is heard, the remaining digits will be dialed using tones. If a dial tone is heard, the en tire string after the P will be dialed using pulses.
Normally, the 0 command places an implied P at the beginning of the dial string. This causes any dial string to be dialed adaptively. If P is the first character of a dial string, it will override the implied P and force adaptive dialing. The modem will wait 3 s for a dial tone for the implied P, and 4.5 s for a P in the dial string.
2) The special character W means wait 5 s, then dial the next digits using tones (until the next special character is encountered). If W is the first character of a dial string, it will override the implied P and force tone dialing,
3) The special character I means dial the next digits using pulses (until the next special character is encountered). The I does not cause a wait. If I is the first character of a dial string, it will not override the implied P-it will force pulse dialing after the implied P.
Examples of different dial strings are illustrated below.
TONE DIAL STRING. A dial string that dials a phone number using only tones starts with Wand has W between the access codes:
W 9 W 1(800)555-1212
U
Lwait 5 s to attain
acces~
then force tone dialing verride implied P, wait 5 s, then force tone dialing
With this dial string, the modem will not report the NO DIAL response. The implied P waits for a dial tone and reports NO DIAL if one is not heard, but the W overrides the implied P. The modem will eventually report NO ANS, but it takes 50 s to report this condition. To allow NO DIAL to be reported earlier (within 5 s), build the tone dial string starting with PW and placing W between the access codes:
37
38
Software Usage and Examples
P W 9 W 1(800)555-1212 ll
Lwait 5, to attain access, then force tone dialing
Dial access code
Wait 5 s, then force tone dialing verride implied P, wait 4.5 s for dial tone, report NO DIAL if none, then force adaptive dialing
The penalty of this approach is that it adds 4.5 s before the access code will be dialed.
PULSE DIAL STRING. A dial string that dials a phone number using only pulses starts with PI (the Pis so NO DIAL will be reported) and has WI between the access codes:
P I 9 W I 1(800)555-1212
ll
LForce pul,e dialing
Wait 5 s to attain access, then force tone dialing
Dial access code
Force pulse dialing verride implied P, wait 4.5 s for dial tone, report NO DIAL if none, then force adaptive dialing
The PI could actually be simplified to 1. This uses the implied P instead of the explicit P, since the I does not override the implied P the way W or P do. The only reason to use the implied P is that it is 1. 5 s shorter than the P, and thus reduces the total dial time by that amount.
TOTAL DIALING TIME. The total time to tone dial PW9W1 (800) 555-1212 is 16.3 s. The total time to pulse dial PI 9WI 1 (800) 555 -1 21 2 is 25 s. By using the implied P, these would be reduced to 14. 8 and
23.5 s. These times are calculated using worst-case times for the operation of the dialer in the modem, as follows:
Tone Dialing
Tone duration
Intertone delay
65-75 ms
65-75 ms
Pulse Dialing
Pulse rate
Interdigit delay
10-11 pulse/s
700-800 ms
Using a Telephone as a Line Monitor
You can connect a telephone to the second modular jack of the HP 82 718A and use it as a line monitor to listen to dialing and data communication activity. If the modem must dial using pulses, the user of the program cannot listen to a phone plugged into the second modular jack until after the dialing has been completed. This is because of the way pulse dialing works.
Pulse dialing actually puts the modem back on -hook briefly during every pulse of the digit being dialed.
For example, if a 7 is pulse dialed, seven pulses will be heard, and the modem goes on-hook seven times. A • telephone connected to the second modular jack is connected in parallel with the modem. If the telephone is off-hook because the user is listening to it, the modem cannot go on-hook while pulse dialing r
~,
\. e g
D e rl s s e j s
Software Usage and Examples because of the parallel circuit, and the pulses will not be dialed. Consequently, a phone cannot be used as J a line monitor while pulse dialing.
The best solution is to identify when it is safe to pick up the phone and listen to it. This point in time can be predicted by calculating how long it will take to pulse dial the number. From the worst-case pulse dialing times just listed, it is easy to develop an algorithm to compute the time T to pulse-dial the phone number. Once the modem begins to dial and echoes the dialed digits of the phone number, T seconds must elapse before the phone can be picked up by the user.
The program below illustrates this timing technique. D$ represents the dial string for the phone number itself-no access codes. The second echoing of the phone number is used as the starting point for the timing because the first echoing is spurious-it occurs as the modem receives the 0 (DIAL) command, not when dialing actually begins. The first echoing of the dial string is read at line 100. The second echoing occurs as the modem actually dials the number, and is detected at line 160.
The computation appears on lines 120-1 SO, and does not take into account W, P, *, or ,I, none of which would normally appear in a pulse-dialed phone number with no access codes. As the program converts each character of the dial string into a number (line 140), illegal characters are trapped out (lines 120 and
150). Then the program accumulates the time to pulse each digit plus the interdigit delay (line 140). The computation provides an extra margin of safety because of the time needed to compute the total dialing time.
1 00 F;$: = " ~.~ D "t: D $ :~.: C H F.: $ ( 1 ::: ) I~ t'W D 0 U T F $ I~ CO::; U E: 1 000
110 DI::;P "Do not. pick up phone!"
120 T=0 ~ ON EF.:ROF.: COTO 150
130 FOF.: 1=1 TO LEN(D$)
140 V=VAL(UPF.:C$(O$[I~IJ» @ T=T+(V+l0*(NOT V»/10+.8
150 NEXT I @ OFF EF.:F.:OF.:
160 F;$:=D$ ~ CO SUB 1000 ~ T=T+TIME
170 IF TH1E<T THEt·~ 170 EL::;E DI:;:;P "m::: t.o pick up phone"
180 ! PrograM cont.inues
U300 ::;$=""
1010 S$=S$tMODIN$ ~ IF POS(S$~F$) THEN RETURN ELSE 1010
If access codes separated by waits appeared at the beginning of the dial string, the waits between the access codes will halt echoing for the duration of the waits (refer to the 0 command). In that situation, you should split the access codes off from the dial string, and use only the echoing of the phone number itself as the starting point for timing.
Manual Dialing
Your application may allow the user to dial a phone number manually, The general procedure is:
1) Ask if the user wants to dial the number manually.
2) If yes, the program must put the modem on-hook with the H (HANGUP) command in case the phone being used to dial generates pUlses. Then the program should put up a message telling the user to dial the number, and to press a key on the HP-75 after dialing. Then the program must wait for the key to be pressed.
39
I r
Software Usage and Examples
3) When finished dialing, the user must leave the phone off-hook or the call will be terminated. Then ~. the user presses the key to signal the end of dialing. The program must then take the modem ~ off-hook and monitor the line status using the 0 (ORIGINATE) command. The program would then proceed as if it had dialed the number itself. The user can put the phone back on-hook any time after the 0 command is executed.
This program gives an example of manual dialing. The ~'J.:=. i t . •• message is needed because the H command takes 3 s to hang up the modem.
1 (1 I t·tpUT
II t'l.:=.nu.:t 1 d i.:t I? 1::I.····n: "; A$
2~:1 IF UPPC$ Ui$::' =
II
'y'
II
THEt·~ :::0 EL~:;E BEEP I~ D I ~:;F'
II
Done
II
I~ ~:;TOP
:::(1 D I ~:;P
II
~'J.::J it. •••
II
I~ t'10DOUT
II
~·~h
II
:~.:CHF::$ ( 1 :::::. I~ F $=
II
~·~OK
II
I~ GOSUB 1 ~3~30
4(1 D I ~::P
II
Pt-e::":.s [PTt·~ ]
I ..
Jhen done d i.31 in';.
II
50 IF KEY$#CHR$(13::' THEN 50
60 t'10DOUT
II
~·~o
II
:~.:CHR$':: 1 :::::. I~ F$=
II
~·~CCtl··H·~ECT
II
I~ C;O~:;UB 1000
7(1 BEEP I~ D I ~:;;P
II
Connect. ed !
II
I~ ~:;TOP
1000 2$=""
1010 2$=2$&MODIN$ @ IF POS(2$~F$::' THEN PETURN ELSE 1010
Connecting Two Pods Back-to-Back
The modem can be placed in either of two opposing modes of operation: ANSWER mode and ORIGINATE mode. When the modem enters ANSWER mode, it goes off-hook, transmits an answer tone, and waits 20 s for an originate tone. Conversely, when the modem enters ORIGINATE mode, it goes off-hook and monitors the phone line for an answer tone for about SO s.
If one HP 82718A is in ANSWER mode and another is in ORIGINATE mode, the two modems can communicate with each other directly. The only hardware necessary for this modem-to-modem connection is a piece of telephone cable with a male modular connector on each end. By connecting the two modems with the cable, placing one modem in ANSWER mode and the other in ORIGINATE mode, and synchronizing them so that the answer tone and the originate tone occur concurrently, the communication link is established.
Below are two programs, one for each of two HP 82 718As; the first one will put its modem into ANSWER mode, and the second one will put its modem into ORIGINATE mode. The programs then monitor the status of the modems to see when they are communicating with each other. The two programs need to be run at approximately the same time, since the originating modem only has 20 s to detect the answer tone issued by the answering modem.
The program for the answering modem is as follows:
10 ! This ModeM is set to ANSWEP Mode
20 MODEM ON ! Turn on ModeM
::;:0 t'10DOUT
II
~.~.:t
II
:3.:CHP$':: 13::'
40 IF NOT HOOK? THEN 40
! Ent. etAt·~S~'JEF.: Plode
! Wait unt.il ModeM is off-hook
50 ON l+HOOK?+CAPRIEP? GOTO 60,50,70
6~:1 D I ~:;P
II tkl connect. i on
II
I~ BEEP 22~J, 1 ~ STOP
7(1 D I SP
II
Connect. i on est. .:tb 1 i shed
II
80 MODOUT KEY$ ~ DISP MODIN$; ~ GOTO 80
40
['hen
,dem then time he H
INATE ls 20 s
Ik and
1S can nodem ng the ie, and ication
\NSWER tor the
:d to be er tone
Software Usage and Examples
The program for the originating modem is as follows:
10 ! This ModeM is set to ORIGINATE Mode
20 MODEM ON ! Turn on ModeM
~:[1 t'10DOUT II ~·~o II g.:CHF.::t
0::
1:::::' ! Ent et- OR I G H~ATE r'10de
40 IF NOT HOOK? THEN 40 ! Wait until ModeM is off-hook
50 ON l+HOOK?+CARRIER? GOTO 60,50,70
6[1
DI::W IIt·k, connect ion ll I~ BEEF' 220,1 IE! ::::TCIF'
7t1 D I ::W II Connect i on est ab I i shed II
80 MODOUT KEY:t ~ DISP MODIN:t; ~ GOTO 80
Line 30 is the only difference between the two programs-the first program enters ANSWER mode by executing the A (ANSWER) command, and the second program enters ORIGINATE mode by executing the 0
(ORIGI NATE) command. Line 50 controls the program flow while the two modems are establishing the communica tion link. It is the same self -timing technique described in the section "Detecting Connection
With a Remote Computer". Line 40 is necessary so that the program will not halt immediately before the
A and 0 commands have taken the modem off-hook. Line 80 allows one modem to transmit data typed in from the keyboard and transmit it to the other modem, and to display data received from the other modem.
Notice that lines 20 and 80 together constitute the simple terminal program described in "Terminal
Program" earlier in this section. You can use just this terminal program on both HP 8271 8As to establish the communication link between the them. Enter the terminal program on both HP 82718As. Run both programs, and type \ a [RTN] on one and ~.~
0 [ RTN] on the other. The connection will be established when you see %CONNECT followed by %OK (or %1 followed by %4) in both displays. If the connection is not established, you will see %NO ANS followed by %OK (or %2 followed by %4) in both displays. If you connect a telephone to either HP 82718A with another piece of telephone cable, you will be able to listen to the originate and answer tones and to the sound of data being transmitted from one modem to the other.
When the %CONNECT message appears, the two HP 82718As will be on-line to each other, and one can serve as the host for the other. By configuring the host HP 8271 8A to act like the host computer you expect to use, you can quickly begin to see what will happen when the other HP 82718A is used as a terminal. And you have complete control of the configuration of the "host", so you can experiment to see how the modem behaves in different circumstances.
Auto-Answer
The modem can auto-answer-that is, automatically answer incoming calls and respond to a received originate tone with an answer tone, thus establishing a communication link with the calling computer.
The ring count distinguishes whether the modem behaves as AUTO-ANSWER or ORIGINATE-ONLY. If the ring count is zero, the modem will report incoming rings, but not answer them (ORIGINATE-ONLY). If the ring count is non-zero, the modem will answer incoming calls after
ring count
rings
(AUTO-ANSWER).
AUTO-ANSWER and ORIGINATE-ONLY apply only when the modem is in MODEM mode. In VOICE mode, the modem only reports incoming rings, regardless of the ring count. For further details, see the description of the C (COUNT) command in the IILow-Level Modem Command Dictionary".
To specify AUTO-ANSWER, you must put the modem in MODEM mode and set the ring count to a value greater than zero. Here is a sample program:
41
Software Usage and Examples
10 I HPUT
II t·~ur·lbetof 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)
40 t'10DOUT
II
~·~h ~ Pl,
C
"!~.J4$g.:CHR$ ( 1 ::!)
!
!
Convert to hex di9it
:::et t'10DEt'1 r'lOde and t- i
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~ n·~ count
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
[l
.s e g s
:l rt
;Y rt re ot re
Software Usage and Examples response. If the BUSY response is not all read at once by t'1OD I t·U, the response will be identified wrong.
If only loBU is read, for example, the check for the response would be identified as the short form of %BAD
ANS-loB. To avoid this conflict, the program should look for either long or short responses, but not both.
If the result of dialing is the BUSY response, detected on line 40, the program redials with the R command on line 50. Since the D command on line 20 stored the dial string, the dial string is optional for the R command. The R command will dial the string a maximum of 10 times. Variable E: keeps track of the number of BUSY responses reported while redialing; after 10, the program stops.
If the result of dialing is CONNECT, detected at line 1010, the program will inform the user and proceed starting at line 110. If the result of dialing is BAD ANS or NO ANS, detected at lines 1020-1030, the program halts.
Uploading a Text File to a Host Computer
One of the most common applications using the modem is to upload a file from the HP-75 to a host computer. The file could be bar code data collected during inventory, data typed in while running an application program, a memo, or whatever you happen to have. This example will outline a simple, straightforward procedure for uploading an HP-7 5 text file to an arbitrary host.
To upload a file, you will need two programs. The first program, which will reside on the HP-75, will transmit the file. You can write this program by following the sample which is shown in this section.
The second program, which will reside on the host computer, must accept input from the HP-75 as a remote terminal, and place the input in a file. Fortunately, you will not have to write this program, because every host computer has a program already available to perform this function--an editor. The purpose of any editor is to accept input from a remote terminal and place the input in a file. For this file upload procedure, a simple line editor is all that is needed.
Below is the general procedure to upload a file usmg a line editor. The numbers in parentheses correspond to the line numbers in the sample program. This procedure will work with any host; you only need to change the commands in the sample program to accommodate the syntax of your system. (The sample program illustrates the syntax for the HP 3000.)
GENERAL FILE UPLOAD PROCEDURE
1) Find out what file is to be uploaded (lines 30-60).
2) Set up protocol to match your host, and establish connection (lines 70-80).
3) Log on (line 90).
4) Purge any file with the same name as the file to be uploaded off the host system (line 100).
5) Invoke the line editor (line 110).
6) Enter the mode for inserting data into the editor workspace (line 120).
7) Read lines from the HP-75 text file and transmit them to the host (lines 130-150). Each line should be followed by the end -of -line indicator (line 20) for the host.
8) End the data insertion mode (line 160).
43
Software Usage and Examples
9) Save the file on the host system (line 170).
10) Exit the line editor (line 180).
11) Log off (line 190).
12) End the communication session (line 200).
1~:1 DHl D$[255J
20 R$=CHR$(13) ! End-of-line sequence
::::0 HWUT "F i Ie t.o send: "; F$
4(1 ot·~ EF.:ROF.: BEEF' I~ D I SF' "t'~ot a t. e::d. f i 1 e
II
I~ ~'~A IT 1 I~ GOTO :;::0
50 ASSIGN # 1 TO F$,TEXT
60 OFF ERF.:OR
7(1 t'10DOUT
II
~';k e:;::aQSQ$Q, f 4" g.:R$ I~ GO::;UB 2000
::::~) t'10DOUT "~';d (::.::>::::.:: >I~;~I::I-ZZZZ" :j.:R$ I~
!
GOSUE: 20(1[1
F't-ot oco 1
!
.~nd p.~t-
Call t. he host i t.'::1
'30 t'10DOUT
II
HELLO uset- •. "t:R$ I~ GO:;:;UB 200(1 ! L09 on
1
(n) t-10DOUT
II
PURGE ":i.:UF'RC$ (F$) :i.:R:$ I~ GOSUB 2000
11 ~:1 t'10DOUT "ED I TOR" tP$ I~ GO:;:;UB 2(HJO
! F'l..wo;te t his f i 1
e
! I n'.)ok e the ed i t ot-
120 t'10DClUT
II fi
II
:H~:$ I~ GOSUB 2000 ! Ent. et~1DD r'lOde
130 ON ERROR GOTO 160 ! St.op when EOF found
140 READ # 1 ; D$ ~ MODOUT D$&R$ ! Send each line of the file
150 GOSUB 2000 ~ GOTO 140 ! Read anyt.hing received and cont.inue
160 t'10DOUT
11 .......... 11
:i.;R$ ~ GO:;:;UB 2000 ! E::< i t. ADD r'lode
17(1 t'10DOUT "I<EEF' l'g.:UF'RC$(F$)tF.:$ I~ CO:;:;UE: 200(1 ! :;:;.::J'.}e t.he file
1 :;::[1 t'10DOUT "E>:; I T
II
:i.:R$ I~ GO:;:;UB 2000 ! E::< i t. t. he ed i t
190 t'10DOUT
II
B\'E
II tR$ I~ GO::;UB 2000 ! L09 of f
200 t'1ODOUT
II
~';h
II
:i.:R$ I~ GO::;UB 2000
210 ::;TOF'
! End COf'lfolun i c,::Jt. ion sess i on
2000 D$=MODIN$ ~ IF LEN(D$) THEN 2000 ELSE RETURN
Line 10 allows text file lines of up to 255 characters. If your application actually creates lines that long, make sure your editor can accommodate them. Changing line 50 to A:;:;:;:; I Gt·~ # 1 TO
F$8.:" : >::r'ler'l" , TE::-n will read lines out of text files on the electronic disc.
Line 70 sets the handshake protocol. The K (KONTROL) parameters, ~j-K~ are set to E3AQSQ$Q, where ~ represents control-Q (OCl) and $ represents control-S (P¢j3). Setting Rl to E enablestlle following protocols: Transmitter XON/XOFF (bit 3 set), Receiver XON/XOFF (bitiset), and Receiver ENQ/ ACK
(bit 1 set). Setting ~~ to 3 causes P;.~ (bit 1 set) and ~,g~ (bit 0 set) characters to be stripped from the incoming data stream. Setting Rj3 to A enables Prompt Mode (the HP 3000 editor sends a pol as the prompt character when it is ready to receive the next block of data). It also sets the receive buffer block size to 24 bytes. The modem will send an *Q~t when the receive buffer has received 24 bytes (40 bytes empty).
The ~~-~~ characters have their default values. ~~ is the prompt character since Prompt Mode is enabled, and the default value for ~~
Cpq:n happens to match the prompt character that the HP 3000 edi tor issues.
Line 70 also sets parity and data length. The HP 3000 expects 8-bit data, which corresponds to F 4.
44
Line 110 invokes the editor. Your editor may require the file name as a parameter. If you include it here, you may not need it at line 170.
"
Software Usage and Examples
Line 120 enters ADD mode for the HP 3000 editor. Your editor may not have an explicit data insertion mode; instead, it may require a character preceding each line inserted. If the character was an I, then each line would be added by changing the t'1ODOUT on line 140 to t'10DOUT "I" :~.:D$t:F.:$. Line 160, which ends ADD mode, would then probably not be needed.
Your editor may exit as it writes the data from its workspace into the file. If so, line 180 will not be needed.
Depending on your host system behavior, you may want to send a break (using the B (BREAK) command) before hanging up (line 200).
The subroutine on line 2000 simply reads the contents of the receive buffer and throws it away until the buffer is empty. This prevents echoed data (i. e., all the editor commands and all the data that is entered into the file) from filling up the receive buffer and halting transmission. If the modem has to send an
XOfr because the buffer begins to fill up with echoed data, and never sends an ~~ not emptied, the transmission from the host may be halted. Your editor may have a mode which inhibits echoing the data. If so, you can invoke that mode when you enter the editor, or you could configure the port you dial up to not echo.
Command, Data, and Response Echoing
Three commands control command, data, and response echoing: E (ECHO), G (GIVEBACK), and L
(LONG). (Remember that when the modem echoes anything (commands, data, or responses), it does so by placing the item being echoed in its receive buffer for nOD HU to read.) Even though these commands are described in the "Low-Level Command Dictionary" and illustrated in different examples in Section 2, they are discussed again here to clarify their relationships.
The E (ECHO) command enables (E 0) and disables (E 1) echoing of low-level commands. The G
(GIVEBACK) command enables (G 1) and disables (G 0) echoing of data sent from the HP-75 to the modem. The E and G commands are totally independent of each other--<:ommand echoing occurs independently of data echoing, and vice versa.
The L (LONG) command selects whether modem responses will be long (L 0) or short (L 1). Responses are unaffected by the E and G commands. Regardless of whether the modem is echoing commands or data, responses will be reported-the L command only controls their length.
Sending Command Characters as Data
There are three ways you can send the command character as data:
1) Use the N (NEW) command to change the command character to something else.
2) Use the U (UN LI STEN) command to instruct the modem not to monitor the transmit data stream for the command character.
3) Send the command character twice in a row.
An example of the use of the N (NEW) command is:
10 t'10DOUT " \t·~ !
II
:~.:CHF.:$ .::
20 t'10DOUT
.'.
:::0 t'10DOUT
1 ::::::.
" ! t·~ ~.~
II g:C:HF.~$ ( 1 ::::::.
45
.
)
1
r
Software Usage and Examples
Line 10 changes the command character to !. Line 20 sends the old command character. A carriage ~, return is not needed because data only is being sent, not a command. Line 30 changes the command character back to %; if the! character is subsequently sent to the modem, it will be seen as data. Notice that while the command character is !, it must be used in all commands, including ! N for the NEW command on line 30. These three lines can be combined into one string for t'10DOUT as follows (note the placement of the carriage returns only after each N command):
10 t'10DOUT
II
~·~t·~ !
II
8.:CHF.:$ ( 1:::) :~.:
II
~.~
II t
II
! t·~ ~.~
II
:~.:CHF.:$ ( 1:::)
An example of the use of the U (UN LI STEN) command is:
1
[1 t'10DOUT
II
~·~U
2[1 t'10DOUT
II
~.~
II
111 :~.:CHF::$ ( 1 :::)
Line 10 tells the modem to treat the next 1 byte as data only-ignore any command characters in that data. The byte at line 20 is then sent on unprocessed. No carriage return is needed on line 20 because only data is being sent. These can be combined into one string for t'1ODOUT as follows:
1
[1 t'10DOUT
II
~'~U 111 :~.:CHF::$ ( 1 :::) t
II
~.~
II
The use of two command characters is shown below:
10 t'10DOUT ...•...•
To send a string containing one or more command characters (assuming there are no deliberately embedded commands), the three approaches are applied slightly differently. The N command is used as follows:
1
[1
P=PO::; (::;$,
II
~.~
I I )
I~ IF P THEt·~ t'10DOUT
II
~·~t·~
! II
:U::HF::$ ( 1 :::)
20 t'10DOUT ::;$
::::0 IF P THEt·~ t'10DOUT
I I ! t·~ ~.~
II
:~.:CHF::$ ( 1 :::)
Line 10 changes the command character to ! if there are any command characters in S$. Line 20 sends the data, and line 30 restores the old command character if it had been changed. This will not work, of course, if the string contains one or more ! characters.
The U command is used as follows:
1
[1
I F PO::; (::;$,
II
~.~
I I )
THEt·~ t'10DOUT
II
~·~U
II tSTF.:$ (LEt~ (S$) ) g.:CHF::$ ( 1 :::)
20 t'10DOUT S$
46
e j
Software Usage and Examples
If there are any command characters in !:;$, line 1 a uses the length of !:;$ as the argument for U.
However, the U command expects the number of bytes to be in hex, not decimal, so this approach only works for strings up to 9 characters long. To provide the U command a hex argument, you must either write a decimal-to-hex conversion routine or use the conversions in the HP-75 I/O ROM. Alternatively, you could send the string in blocks of fixed length, preceding each block with U block length. Or you could send the string in blocks of variable length, with each block consisting of all the data between command characters. Each command character would then be sent using U 1 or by sending it twice, as shown below:
10 P=PO!:;
20
C:;$,
"~.~"::' I~ IF t·lOT P THEt·~ t'm D 0 U T !:; $ [ 1 , P H:
II
~.~
"
I~
!:; $:
=
$: [ P
:::0
+ 1] I~ Ci 0 T 0 1 0
:::0 t'10DOUT !:;$
Line 1 a locates a command character. The string up to and including the command character is transmitted, followed by a second command character. Then the string is set to be the substring from past the location of the command character to the end of the string. This process is repeated for each command character in the string until there are no more, at which time the rest of the string is transmitted.
Note: because the previous examples do not read the modem receive buffer with t'10D I t'~$ after each t'1ODOUT, any echoed data saved by t'lODOUT will be lost, and modem responses may fill up the receive buffer and haIt data transmissions.
Decoding the QUERY Response
The Q (QUERY) command asks the modem for information on ring count, data communication status, and operating mode. This status information is placed in the modem receive buffer for t'1OD I t·~$ to read in the form of a two or three byte string. The first byte is a hex digit (a-F) that represents the current ring count. The second byte identifies whether the modem is on-hook or off-hook, and in voice or data communica tion:
Character
H
C
N
Meaning
On-hook
Off-hook, carrier detected
(data communication) off-hook, VOICE mode
(not data communication)
If the modem is in VOICE mode, then a third byte, a V, is returned after the first two bytes.
If command echoing is enabled (E 0) and the command character is receive buffer as %q GR(..t
%, the Q command is echoed into the
Then, the query response is preceded by a command character and followed by a
~R i("~.
If respoI1.sesare long (L 0), the query response will end with ¢R(..r
D,"HP S2718A Errors and Responses"). The entire response is as follows: .... .......
%OK
OR
.~~
. .................. .
(see appendix
I'
1
47
48
Software Usage and Examples
Starting at the leftmost
% in this string, the ring count will appear at character 6, the on-hook/off-hook
To decode the query response, use a program status at character 7, and the V (if present) at character 8.
" like this:
I j ,
100 P$=CHP$ 0::
1 ::;:::0 I~ t'10DOUT
II
~'~L
11 (1 t'10DOUT
II
\q"
g.:P$ I~ GOSUB 1
0, E 0
OO~)
II
:~.:P$ I~ GO::;UB 1000
120 C$=t'1$
[Eo,
6 J I~ IF C$< = "9" THEt·l C=",.'AL
1:::0 DI::;;P "Pin'~ count. ="; C
0::
140 m'l PO::; ( "Hell", t'1$[7, 7J::O GOTO 150,
16~),
150 D I ::;;p "On-hook";
I~ GOTO 1 :::0
C:$:::O EL::;;E C=tKIt'1( C$::O -65+ 10
1 ?~) i t. h
c.3n-
i
et-";
I~ GOTO 1 ::;:(1
160 D I ::;p "Of f -hook 1.,.1
17~J [lISP "Off-hook";
1 SO IF t'1$ [::;:, :::: J =
III,,.'''
I!! GOTO 1:::(1
THEt·l D I ::;;p "; l,lO I CE r'lOde"
190 ::;;TOP
1000 t,t!=""
1 0 1 ~:1 t'1$=t'1$:~.:t'10D I tU
1020 PETUF.ll
I!! IF t·WT PO::;
0:: t'1:t, "~'~OK" :~.:P$g.:CHI?$ 0::
10::0::0 THEt·l 1010
Line 100 specifies long responses and enables command echoing, buffer. Line 110 executes the
Q then clears the response out of the receive command and reads its response from the buffer. Line 120 turns the hex digi ts A - F in to a ring count of 1 0 - 1 5. Line 1 40 branches that identify the status: to line 150 if the next character to sta temen ts where messages are displayed of the response is an H, to line 160 if a C, and to
170 if an N.
At line 180, the next character is examined. unusual one
If it is a V, appended to the already displayed messages. This approach it means
VOICE
mode, and this information is is used to accommodate all cases, including the
(OCV)
described in the caution under
Q in the "Low-Level Modem Command Dictionary".
The messages displayed by this program are:
Query
Characters
H
HV
C
CV
NV
Message Displayed
On-hook
On-hook;VOICE mode
Off-hook with carrier
Off-hook with carrier;VOICE mode
Off-hook;VOICE mode
•
Software Usage and Examples
ELECTRONIC DISC SOFTW ARE
The HP 82718A provides 32 or 64 kbytes of additional memory for your use. This memory does not expand the main memory of the HP-75; that is, you cannot create and run programs that are larger than the 14,000 bytes available in the HP-75 (22,000 bytes with the 82700A Memory Module). The extra memory behaves like a fast, reliable mass storage device-you can copy files to and from it, catalog it, and purge and rename files on it, just as you would on a cassette or disc drive. You can also create text and data files as large as the available memory in the HP 82 718A. Operations are fast because memory can be accessed quicker than a mechanical device, and reliable because there are no moving parts. Because this RAM behaves like mass storage, the extra memory is called an electronic disc.
The electronic disc software lets you create, access, and modify text and data files on the electronic disc, establish a hierarchical file structure, and copy files into and out of the electronic disc. This software is designed to be a logical extension to the HP-75 operating system. Everything you understand about random and serial access of text and data files can be easily extended to include the electronic disc, and
HP-75 commands that apply to mass storage devices will behave the same way when used with the electronic disc.
Adapting Existing Programs to Use the Electronic Disc
The electronic disc is identified by the device code >::t'1Et'1 (for extended or external memory). You can use this code in all the places where you would normally use an HP-IL device code for a mass storage device.
For example, to copy file ABC from HP-7 5 main memory to a cassette drive named t'11, you would type:
COP'-!' "ABC" TO ":t'11" [RTN]
To copy the same file to the electronic disc, type:
COP'r' "ABC' TO ": ::-::t'1H1"
[RTN]
Commands that are extended to use the
COP'-!', PUHGE, and PEt·~At'1E.
>=:t'1Et'1 device code for the electronic disc are A::;::::I Gt·~ #, CAT,
Programs that interact with mass storage or with text and data files can usually be modified to use the electronic disc with only trivial changes. If a program is accessing files in main memory or on mass storage, all that you need to do is add or change the device code. One way to do that is to change all the file references so they append the device code as a string variable. Then set the string variable to reflect the use of main memory, mass storage, or the electronic disc:
1O~]
20(1
COP'r' "ABC: t'11" TO G$
PUPGE "DEF: t'11
II becomes
49
r
Software Usage and Examples
1 ~:1[1 COP''''' "ABC" t:C$ TO G:t.
2(1(1 PUF.:GE
II
DEF
II t:C$
If C$=" : t'11" , an HP-IL mass storage device named t'11 will be used. If [:$=" : >::t'1Et-1" , the electronic disc will be used. If C$="
II
(null string), main memory will be used. Once this change has been made throughout the program, the file's location can be changed globally within the program by just changing the line where the string assignment occurs.
If a program is using text or data files, the only code that needs to change is that where the files are opened. For example, to open a file in main memory:
, becomes
Subsequent PEAD #, PP I t·n #, and F.:E::nOPE data pointer within file
*t. statements will read from, write to, and move the
::<'''''Z on the electronic disc. Again, set a string variable to either the null string or :
II
::·::t'1Et'1, and change file references to append the string variable (e.g.,
>:: 1/ Z
II
:~.:C:$).
A::;::; I Gt·~ # 1 TO
NOTE
If you have existing programs that were written on a stand-alone HP-75
(i. e., not installed in an HP 8271 8A), you will need to reenter certain program lines for them to properly use the electronic disc. For details about this, see appendix C.
50
Initializing the Electronic Disc
The HP-75 and the electronic disc are initialized independently of each other, just as the HP-75 and an
HP-IL mass storage device are initialized independently. If the HP-75 is reset ([SHIFT] [CTL] [CLR]), the electronic disc is not. Similarly, if the electronic disc is reset (UH T I AL I ZE ": ::·::t'1Et'1"), the
HP-75 is not.
The electronic disc can be reset to its default state by executing I HIT I AL I ZE ": >::t'1Et'1". This is the only way for the user to erase the contents of the electronic disc. The electronic disc software resets the disc automatically at three different times:
1) The HP-7 5 is turned on and the electronic disc has not previously been initialized.
2) The HP-7 5 is turned on and the electronic disc contents have been corrupted.
3) The electronic disc RAM is bad.
•
t
Software Usage and Examples
Since the reset occurred without your intervention, you are warned about the initialization with
EF.:F.:OF.:: ::·::t'1Et'1 I t·~ I T I AL I ZEd. When the electronic disc is initialized, all files are erased, and the root directory····· is created. >=:CAT$
([1) returns the catalog for ..... and shows the time and date that the electronic disc was last initialized.
Interaction With the 1/0 ROM
The HP 00075-15001 I/O ROM includes an extension of the HP-75 CALL statement that allows you to specify a list of parameters to be passed, and a device code specifying where the called file resides. For example, if you have an HP-IL mass storage device assigned the name t'11, CALL " filename: t'11
II will copy that file into HP-75 main memory and call it. When the I/O ROM is plugged into an HP-75 installed in the HP 82718A, the electronic disc software extends the I/o ROM's include files on the electronic disc. If you use
CALL statement to
::·::t'1Et'1 as the device code (i.e., CALL
"filename:
::·::t-1Et'1"), the program file on the electronic disc will be copied into main memory and called. CAL L only works with filenames, not pathnames-the entire electronic disc will be searched to find the specified file.
The CfHH and CLEAF.: ti:::;::; I c;t·~# commands provided by the I/O ROM will also work for electronic disc files, but the other 13 file manipulation commands will not. flD',iFitK:E.#,
Hl::;EPT#, L..A::;n.JP, L.. UlELEt'l#, F'P
[I[LEHJ:i:, nmE::<=lt, un
:j:1: 1..1::; I t··IC, F.:E.PLHC:[j:!=, :::;[:HF::CH#, and ::::;FE.Kt~ all report EF.:F.:OF.:: i nl.}.=:t 1 i d f i 1 espec for electronic disc files. F I L.E:t returns the name of an electronic disc file underlined, and L I t·lE.# returns a negative line number, unless a file of the same name exists in HP-7 5 main memory. I TEt'1# always returns 1 for an electronic disc file.
Hierarchical File Structure
The electronic disc software gives you the option of creating a hierarchical file structure on the disc. This allows you to organize your files into logical groups. For example, all your BASIC programs can be organized under a single directory. You could create a directory for all text files, or one directory for memos and another for files containing collected inventory data. Or you might want all programs and data relating to inventory under a single directory. Any file can be accessed by name only or by specifying the directory it is in.
Here is an example of how a series of files and directories might be organized on the electronic disc. For clarity, directories are distinguished from individual files in the diagram by lowercase letters. The level of each file or directory within the hierarchy is shown along the left edge of the diagram. leve 1 0 (root) leve 1 1 level 2 level 3 leve 1 4 lexfi les
/
PMSCMDS barcode CONFIG datacomm
/
SCANNER
~ hp3000 reports
~ phone EXPENSES
\
TERMINAL DIALER
~
DOWNLOAD UPLOAD
51
l
52
Software Usage and Examples
In this hierarchical file structure, files and directories are organized as branches in a tree, and each must have a unique name. Only directories can have other files or directories attached, called child files or directories-the files or directories one level down in the hierarchy. Individual files (BASIC, text, LEX etc.) cannot have children in the hierarchy. Any file or directory will always be attached to a directory called its parent directory-the directory one level up in the hierarchy. (Note that a directory is not a file-it is a file organizer.)
The only fixed directory is the root directory, called ..... , at the beginning of the tree. Its level is zero, and its parent directory is also ..... .
On any level within a directory, all files and directories are in alphabetical order. Examples are files on level 4 within the hp:::OOO directory, the directories on level 1 within the root directory, and the files and directories on level 2 within the pt-09t-ar'lS directory. Consequently, on any level across the hierarchy, files and directories are not necessarily in alphabetical order (for example, the files and directories on levels 2 and 3).
File searches start at the location specified in the path name, or at the root directory if no location is given. A search goes along the left-most branch (alphabetically) of the tree until the end of the branch is reached. Then the search proceeds back up the branch to a directory and from there to the next left-most branch until that branch has been searched. The search continues in this manner across the hierarchy until the file has been found or the end of the file system is reached.
For example, to find the TEF.:t'1 I t'~AL file, the electronic disc software searches the 1 e::d' i 1 es directory, then the pt-O';:tt-.:H'lS directory. Within the pt-o';:tt-ar'lS directory, the b.:wcode directory is searched, then the branch containing cm·w
I G, then the d.:d. aCOP1Pl directory. Within the d.:d. -3Cor'U'l directory, the hp:::[1[1[1 directory is searched, then the branch containg TEF.:t'1 I t·mL.
Because of this search order, TEF.:t'1 I t·il=jL will be found after UPLOAD, even though TEF.:t'1 I t·iAL is lower alphabetically.
LI
. .
You can select the current directory (initially·····) with DIP I ::;. Then you have direct access to files within the directory without including the directory name as part of the pathname. This is similar to having the files in that directory as the only files on the electronic disc. Wild cards can be used to ease file selection (discussed later).
Directory Levels
The maximum nesting of directory levels is 7 levels, including the root directory. . .... is level 0, so the directories you create will be levels 1-6. The child files of a level 6 directory will be level 7, but no directory can be on level 7. Directory levels are shown in the length field of the indented catalog listing produced by CAT ALL ": ::·::t'1Et'1". Directory levels are also shown in character position 17 in the string returned by
::-m
I F.:$. File and directory levels are shown in the tenth character position of the string returned by ::< C AT $ (for directories, the level is at both positions 10 and 17).
Pathnames
You specify a file on the electronic disc with
II
pathname:
::·::t'1Et'1". A pathname is the path that must be followed through the hierarchy to reach the desired file. Syntactically, a pathname looks like this:
pathname
=
[location] [filename]
The location is the sequence of directories leading to the one containing the desired file, as follows: l
e o g e e
Software Usage and Examples
location
=
start
[>
first directory> second directory> ...
>
last directory>]
Start
indicates the location within the hierarchy at which the location sequence begins, and defaults to the current directory.
Start
can be a directory name, ..... (the root directory),
>
(the next name is the name of the child file or directory), <: (parent directory--<:an be used more than once anywhere, except after> ), or ? (discussed shortly).
The use of location is optional. If you do not include location in the pathname when searching for a file,
(that is, the pathname is of the form
filename: ::·::t'lEt'l),
the entire electronic disc is searched, just like
HP-75 main memory or a mass storage device. If a file is copied to (if it doesn't already exist) or created on the electronic disc and has no location, it is put in the current directory. The use of location implies a knowledge of the file structure, and file searches and creations are performed as indicated by the path name.
Each directory occupies 25 bytes of the electronic disc. If you do not want to take up that memory, you do not have to use the hierarchical file structure. In that case, all files will be organized alphabetically under the root directory.
Unlike mass storage file specifiers, pathnames do not allow passwords. There is no file protection mechanism provided for files on the electronic disc.
I
WILD CARDS IN PATHNAMES, Two wild card characters can be used in pathnames on the electronic disc. The dash (-), used in either filenames or directory names, replaces one character, and will match any character. The question mark (?), used for location, indicates zero or more directories, and causes file searches to begin at the location up to the? (default is the current directory). The question mark must be used in the form
II
[location]?> filename:
>::r'lero1".
All pathnames used to reference electronic disc files or directories can use wild cards except PUPGE
DIP. Wild cards cannot be used to reference files in HP-75 main memory except when using the
PH10\,'E statement.
EXAMPLES OF PATHNAMES, Here are some examples of ways to specify the file Dm'H'~LOAD in the example hierarchy. dOI.,Jn 1 o.:=id:
::{r'ler'l hp3000>download:xMeM
A?>do------:XMeM
Search entire electronic disc
Follow this path to
DO~'J~'~LOAD
Search for Dm,mLOAD starting a t the h p:3 tH~H:::1 directory
Find the first occurrence of a file with the first 2 letters do
Search only the directory d.:=it. -3COr'U'l
53
Software Usage and Examples
AprograMs)datacoMM)?)download:xMeM
Comprehensive Example
This example will create the file system illustrated earlier. in i t. i ali ze ": >::r-lef'l" cat .311 tl3f'le
II :
::<f'ler-lll
TI::Ipe Len
D [1
Date creat. e d i t-
II dat aCOf'lf'l) hp:::[1[10: ::{f'ler-l ll
COpl;:! II t et-r-l i na 111 toll dat acor-1Pl) : ::{r-1ef'111 cop';:!
II up load
II t.
0
I I :
::<r-ler-1 11
COP9
II pMscr-lds
II t.
0
II
1 e::·::-----) : >::r-1er-l ll
::<d i t-$
HP:::01~1[1 o
54
Search only the directory d.3t acoplr'l
Reset electronic disc
Show everything on electronic disc
Create 1 e::·::f i 1 es as child of ..... directory
Create pn:"~tas child of .....
.3 f'l S directory
Copy Cot·W I G
Pt-O-dt- ·3r-1S directory into
Create d.3t. ·3COf'U-1 directory as child of Pt-09t- ar-1S
Create hp:::~300 directory as child of dat. aCor-1f'1
Create phone directory as child of Pt-09t-·3r-1S
Copy TEF.~t-1 I t·mL dat. acor-m directory to
Set current directory to hp:::0[10
Copy DO~-Jt'~LOAD hp:=:OO~3 directory to
Copy UPLOAD to hp:::00~) directory
Copy D I ALEP to first directory starting with ph
Copy Pt-1SCt'1[I::; to first directory starting with 1 e::{
Identify current directory
t
Software Usage and Examples
Create b.:H-code directory on same level as and phone d.::d. acor'H'1
COpl::l
II scannet-
II t.
0
II •• • ••
>
Copy ::;CAt·H·~EP bat-code directory to
Create t-epOt-t.
S directory on same level as 1 e::d· i 1
I:? 5 and Pt-Oo;lt-·:H'lS ass i ';tn # 1 t.
0
II e::<F'enses: >::r'lerol ll
, t e::d.
Set current directory to t-epot-t. s
Open E::-::PEt·~::;E::; text file in t-
12 P 0 tt
S directory
Write a string to the file
Show files within this directory cat. ":>: ::<Pler'l"
NaMe Type Len TiMe Oat.e
REPOPTS
EXPENSES
0 20:20 06/05/84
T 42 20:20 06/05/84 cat. ": ::<r'ler'1
D I t·~ar'1e
F' t'1 ::; C t'1 D ::;
SCAt-H·~EP
DCI~'lt·~LOAD
B :::~3 1 1 20
Cot·1F 1 G B
:::t,a:+ 1 4
B '3:::7 1
.=.
._'
UF'LOAD
TEF.:t'1 H~fl
ALEF.:
L
E::-::PH~SES
11
TI::Ipe Len
L
B
B
1 2 21
5:::[1 1"='
2t.:12~~,
B t.5'35
.-.,-,
.::.::..
.:,.:.
':-'-'
T 42 20
·
·
.
·
·
1
1
....
("
.-,"",:,
'::'1'
47 04 .....
,-,
CI
:::1:.
1 2 ..... 2~)
..
-.
..... :::::::
".-,
.-.
1
.-.
O.;:jte
1 ~~I./25.""f::2
04 .....
0;2 (1::: .....
0;2 0 1 ...
..
".-
1
2
1
1
(1 .....
-:0 f
::::4
1.····::::4
1.····:::4
,/::::4
·
20 06.· .. ·[15 ..... ::;:4 cat. .;:j 11
II :
>::r'lepl11 t·l.:Jr'l12 TI::Ipe Len T i r'le
.....
D [1
LE::-::F I LE::; D
P t'1 ::; C t'1 D ::;
1
L 2512
PPOG PA t'1 ::;
BAF.:CODE
::; C A t·l t·~ E F.:
D
D
COt·~F I G
DATACOt'1t'1
HP:::000
B
D
DO~'lt·~LOAD
PEPOF.: T ::;
E::-::P E t·~ ::;ES
B
D
1
.-,
.::.
::::011
!::t.4
.-,
.::.
UPLOAD
B 13:::7
B
5:::(1
TEPt'1
PHOt·~E
I t·~AL
D
B 2t,2E.
.::.
D I ALEF.: B
t.5
1
35
D
T
1
4·-'
Date
Show all files on electronic disc i
I
5S
Software Usage and Examples
BAR CODE SOFTWARE
The HP 82718A includes software that decodes two types of bar code labels, Code 39 and Code 11, when scanned by a digital bar code wand and the HP-7SD. The decoders are compatible with switched and unswitched wands, high resolution infrared wands (wavelength 830-920 nm), and medium resolution visible light wands (wavelength 700 nm).
The CODE:::9$ and CODE 11 $ keywords scan Code 39 and Code 11 bar code labels up to 42 characters long (including the check digit) and decode them into strings of ASCII characters. Audible feedback indicates good and bad scans. The keywords CD I G ITO t·~ and CD I G ITO F F (default behavior) allow you to specify whether the decoders should automatically verify the check digit while scanning. For unreadable labels, CD'· ... :::9 and CD'·.·'ll verify the check digits of labels entered from the keyboard.
The bar code commands duplicate commands that exist in the HP 82
nSA
Bar Code Reader Module (see appendix C for details).
Scanning a Bar Code Label
To scan a label, enter the keyword for the type of label to be decoded (either CODE:::9$ or CODE 11$), then scan the label with the wand. If the HP-7 SD can decode the label, it will return the scanned data as a string, and issue a high tone. If the label did not decode properly, or if 2-1/2 minutes have gone by with no scanning, a null string will be returned, and a low tone will be issued. If CD I G I T ot'~ has been executed, labels without check digits will not decode properly.
Here is the recommended procedure for scanning a bar code label with a wand:
1) Connect the wand to the HP-7 SD, and turn the computer on.
2) Execute the keyword for the type of label you are scanning
CODE 11 $ for Code 11 labels).
(CODE:::'3$ for Code 39 labels or
3) If you are using a switched wand, depress and hold the wand switch.
4) Place the wand tip into the quiet zone (the white area preceding the bar code label), with a tilt angle between 0 and 30 degrees normal to the surface.
5) Scan the entire label smoothly, making sure the wand tip does not go outside the rectangular boundary of the bar code label.
6) If you are using a switched wand, release the switch after scanning the label to conserve battery power.
Using Audible and Visual Prompts
Most applications will use some type of programmed prompting to signal the user when to scan the label.
The BEEF' command gives audible prompts, and the D I ::;p command gives visual prompts.
The prompting done by the program and the scanning done by the user must be synchronized. The program should not wait so long after a signal that the user scans before the decoder is ready. Here is a program guaranteed to frustrate anyone trying to scan labels:
I
\I u
H rn at ft
CI
CI th
1 j j
1
1
1
1
1
1
56
-
n, as
)y
~n
:1. le a or ilt ar ry en ld
) n
:rs
:;k
,w or ee
Software Usage and Examples
5 DELA'r' ::::
1(1 DISP "!:::can 1.:':Ibel"
2(1 A$=CODE::::9$
::a] IF A$=
II II
THEt·~ HJ
A subtlety of the D I SF' command is its behavior with the current DELA'r' rate. When a D I SF' statement is executed, the program waits for the DELA''''' time before continuing execution. This wait causes difficulty in scanning labels. The user begins scanning when the !:::c.:':In 1 abe 1 prompt appears, scans two or three times during the 3 s wait, and gets no audible feedback. Perhaps in the middle of the fourth scan, CODE::::9$ begins to execute, sees only the last half of the label, and issues a low tone to indicate a bad scan. Then the cycle repeats until the user hits it just right.
The user has experienced a tremendous frustration at the perceived poor performance of the software, when in fact poor program design has caused all the problems. The time from when the prompt appears to when it is valid to scan should be as short as possible to prevent the program from being out of sync with the user. Setting DELA'r' 0 ensures this:
5 DELA'r' 0
1(1 DISP "!:::can label
II
2~] A$=CODE::::9$
:::(1 IF A$="" THEt·~ 10
Checking Field Length
You can check the field length of decoded bar code labels by using the BASIC function LHL This provides an additional verification of the scan; you only need to know the actual length of the label.
Here is an example of using LEt·~ for field length checking.
100 DELAY 0 ~ L=9 ! Define desired length
11 ~:1 D I !::p
II
!:::can 1.:':Ibe 1" ! F't-Or'lpt
120 A$=CODE39$ ! Execute decoder
130
140
IF LEN(A$)=L THEN 180 ! Field length = L
DI!:::P "Len'dth en-CIt-" I~ ~'~AIT .5 ! B.:':Id len'dth
15(1 D I !:::F'
II
!:::c.:':In .:':Iga i nil! F.:escan pt-OPlpt
160
170
BEE P 1 O~] 0, • 1 ! Au d i b 1 e Ptor'l p t
GOTO 12~]
1:::0 D I :;:;p
II
Good t-ead
II
! Len';dt h '· ... et- i f i ed
Verifying Check Digits
Use CD I G I T ot·~ when you want the decoders to automatically verify the check digit while scanning.
However, not all labels can be scanned successfully. When an unreadable bar code label is encountered, it may be necessary for the user to enter the label from the keyboard. In that case, the functions CD',,.'::::9 and CD\,'ll allow the program to verify that the label was entered correctly from the keyboard. These functions perform the check digit verification that is normally done by
CDIGIT ot·L
CODE::::9$ and CODE 11 $ with
.
CD',/:::9 and CD',/ 11 accept a single string parameter, and return a 1 if the check digit verified or a 0 if the verification failed (Boolean functions). Here is an example of using CD',/:=:9 to verify Code 39 labels:
57
7
Software Usage and Examples
100 HWUT
II
L.:-:.be
1: ";
A$ ! ~:::e'::Iboanj
110 IF CDV39(A$)=0
THEN 100 ! ent. t-'::I
COMput.e and verify check digit
120 !
If CDV39=1 then label was good otherwise input again
Comprehensive Example
In this example, we will update inventory on 50 different products on a regular basis. Each item has a
Code 39 label with a check digit character. Since all labels are the same length, the length can be used as an additional check on the validity of the input.
The example program collects decoded bar code labels and stores them in a text file in the HP-75D. The program does not show what happens to that file after all the data has been collected-it could be transmitted to a host computer via the built-in modem, saved on a mass storage device, used to determine what orders to place, etc.
The program saves the collected data in a text file, rather than a BASIC data file. Data files contain overhead that text files do not, so text files conserve memory.
The main loop (lines 50-160) collects the allows up to three bad scans before asking the label and quantity for each of the 50 items. The program user to type in the label. Every time a new item's label is scanned, the bad read count
70). The count is incremented for each bad scan until three
C is initialized (line consecutive bad reads have occurred. Then the program asks the user to enter the label from the keyboard
(line 260), and verifies its check digit (line
280).
Once a valid label has been input, its length is checked using keyboard input). Finally, the label, quantity, and current
LEt·~ (line 120 for scanned input or 290 for date are written into the text file. A space is placed in each record between the label, quantity, and date so that those items can be individually extracted at a later time.
It is important that the program establish the operating state verification is set on line 40. Line 170 turns off automatic of the decoder, so automatic check digit verification. If you then use either decoder for labels without check digits, they will still scan properly.
11
:::1
'31
11
1
1;
1.
1,
1 ~
11
1 '
1:
1 '
2!
2
2
2
2
;2
.-,
.:::.
.-,
.:::.
,-,
.:::.
,-,
.:,
58
1 r
IS
Y it
~r
Software Usage and Examples
10 D H1 A $ [ 4 2 ] ! All
0 1.,.1 f
0 t- Pla >:: i P1U Pl 1 en 'd t. h 1 .~ bel
2~) A:::::: I Gt·j # 1 TO
II
Hj',,o'Et·j: ::·::t'1Et'1 11
,
TE::-n ! Open elect. t-on i c disc f i 1 e
30 DELAY 0 ! Prevent. DISP froM wait.ing
40 CDIGIT ON ! Aut.oMat.ic check digit. verificat.ion
5(1 I t·lPUT
II
Lengt. h of labe 1: "; L ! Get. fie 1 d 1 en'dt. h
60 FOR 1=1 TO 50 ! St.art Main loop for 50 readings
7(1 C=0 ! In i t i 031 i
ze
b.~d scan count
::: 0 D I ::: P " ::: c.~ n 1 .~ bel" ! '.,.' i s u·~ 1 p t-
0 f'l P t t
0
S t .. :3 t- t s c.~ n
'30 BEEP 1000,. 1 ! Aud i b 1 e pt-or'lPt. to st .:H-t sc.~n
100 A$=CODE39$ ! Decode label
110 IF A$="" THEt·j 230 ! B.~d t-e.~d
120 IF LEN(A$)#L THEN 230 ! Bad length
1 :::~) HlP U T "G! u ·:m t i t '::I : "; 0 $ ! t·j W'l b e t-
0 e r'l s
1.,.1 i t h t. his 1 ·3 bel
140 ! Write the label, quant.ity, and dat.e
150 P F.: I tH # 1 ; " ", A $," ", 0 $," ", D I~ T E $
160 t·jE::·::T I ! Cont inue loop
17[1 CD I G I T OFF ! TUtTI of f check
1:::0 ASSIGN # 1 TO
*
! Close INVEN file
190 Et·m
2~)[1
210 ! Bad scan or bad length
220
I
23(1 C=C+ 1 ! I nCn?r'lent. b.~d SC·3n count
240 IF C<3 THEt·j DI:::P "Re::::can 1.~bel" I~ GOTO 90 ! Tt-'=' ·~'d·~in
250 A $ = "" ! I nit i ali z
26~) I t·1PUT "L.~be e f
0
1: ", A$; FI$ t- k
! e '::I b
0
·:W
Tt'wee
d i n put b.:3d sc.~ns, IJse k e'::Ibcl.~I·-d
270 ! If good keyboard input, go check lengt.h else try again
2:::0 IF CDV39(A$)=0 THEN 300
290 IF LEt·l(A$)=L THEt·l 130 ! If length OK, 'det. qtBnt.it.'::I
::: eH]
D I ::: P "I n '·)·3 1 i d 1 abe 1" I~ ~'J A IT. 5 I~ G
I]
T 0 2 Eo 0
S9
---'I~!!i\.ll'
This section describes all the BASIC keywords provided by the HP 8271 8A Expansion Pod. First, the name of the keyword is given, followed by the category of keyword (high-level modem, electronic disc, or bar code) and whether the keyword is a function (returns a number or string) or a statement (performs an operation but returns nothing). The next line lists the syntax of the keyword and its expected parameters.
One or more examples of the use of the keyword follows. The description of the keyword appears next, and includes any cautions, set off by bullets, that should be observed when using the keyword. Finally, a list of possible errors that may be reported by the keyword is given.
Notes on syntax: Optional parameters are surrounded with brackets ([]). >::t'lEt'l is the device code for the electronic disc. The syntax of path names, locations, and directories is described in "Electronic Disc
Software" in Section 2.
Notes on error n urn bers: Error n urn bers of 1 50 or greater are those reported by the HP 827 1 8A, and are described in appendix D, "HP 8 2 7 18A Errors and Responses." The other error n urn bers are included for completeness, but are described in the HP-75 Owner's Manual. statement electron ic disc
ASSIGN
#
A::;::; I
C:it·~
#
file number
TO
"filename:
>::t'lEI"l"
~. E:A:~:,I
, TEo··,T
A::;::; I C:it·~ # file number TO
* c]
A::;::; I Gt·~ # 1 TO
II
E::-::F'Et'~::;E::;: ::-::t'lE t'lll , TE::-::T
AS::; I Gt·~ # 1 TO
Of
Associates the specified
file number
with the specific file on the electronic disc and sets the corresponding data pointer to the first line of the file. A new file is created on the electronic disc if the named file doesn't exist. If the file type is not specified, the default is BASIC .
• A::;::; I Gt·~ # must be used with a filename, not a pathname. To open a file that already exists within the file hierarchy, execute AS::; I C;;t·~ # to the filename. To create and open a file that does not exist within the file hierarchy, first specify the directory with D I F.: I ::;, and then execute
FI::;::; I Gt·~ # to the filename .
• Refer to the HP-75 Owner's Manual and the HP-75 Reference Manual for further information.
Everything that applies to the use and behavior of A::;::; I Gt·~ # in main memory applies to the electronic disc as well.
Errors: 16,62,63,64,68,212
61
62
Keyword Dictionary
AVAIL?
high-level modem function
,
R'·.·'AIL?
100 IF NOT AVAIL? THEN 100
Checks to see if there is data available in the modem receive buffer. Returns a 0 if there is no data available, or a 1 if there is data available. Unlike t'10D I t·~$, which reads any data in the receive buffer, the data remains in the buffer after A'·/A I L? is executed. R'·/A I L? can therefore be used as an alternative to t'1C!D I t·~$ for detecting data in the buffer, but not reading it.
• A I.", A I L? only identifies the presence of data in the modem receive buffer, not the presence of data saved by t'10DOUT (see t·10DOUT).
Errors: 1 50, 1 5 1, 1 53
CARRIER?
I
CAF.:R I EF.:? high-level modem function
1
(1(1
IF t·mT CfiPP I EP? THEt·~ 100 EL::;E D I ::;p
II t·~OI. on-l i ne
II
Checks if there is a carrier. Returns a 0 if there is no carrier present, or a 1 if there is a carrier present.
Errors: 1 50, 1 5 1, 1 5 3
CAT
CAT
"pathname:
::·::t·1Et·1"
CAT ALL ": ::·::t·1Et·1" electronic disc statement
See examples below.
Catalogs files and directories on the electronic disc. If you use directory-related characters C', <:, :> ) or wild cards (-, ?), they imply knowledge of the hierarchical file structure. Directories are listed only when this knowledge is detected. Below are examples of typical use of CAT. The examples are based on the hierarchical file system illustrated in "Electronic Disc Software" in Section 2. Note that the [t}, [t},
[SHIFT] [t],and [SHIFT] [t] keys work the same as for the HP-7S CAT commands.
CAT ": ::·::t·1Et·1"
Catalog all files on the electronic disc (no directories).
"
Keyword Dictionary
CAT II: ::<t'1Hl ll [RTN]
NaMe Type Len TiMe Date
PMSCMDS
SCANNER
L 2512 21:17 10/25/82
8 8011 20:27 04/10/84
CONFIG 8 864 14:02 03/21/84
DOWNLOAD 8 987 13:02 01/11/84
UPLOAD 8 580 13:47 04/17/84
TERMINAL 8 2626 22:18 12/20/83
DIALER 8 6595 23:36 12/23/83
EXPENSES T 42 20:20 06/05/84
CAT II
filename:
::·::t'lEt'l 11
Catalog first file that fits filename.
CAT IIUPLOAO: ::·::t'lEt'l 11 [RTN]
NaMe Type Len TiMe Date
UPLOAD 8 580 13:47 04/17/84
CAT 110-------: ::·::t'lEt'l
11
[RTN]
NaMe Type Len TiMe Date
DOWNLOAD 8 987 13:02 01/11/84
CAT II:>: ::<t'lEt'l 11
Catalog all the files and directories in the current directory.
CAT II>: ::.::t'lEt'lII [RTN] (assume current directory is d.::d.acoplr'l)
NaMe Type Len TiMe Date
DATACOMM
HP3000
0
0
20:16 06/05/84
20:16 06/05/84
TERMINAL 8 2626 22:18 12/20/83
CAT II
location:
::<t'lEt'l
11
Catalog all the files in specified directory.
CAT II F.: E P 0 F.:T ::; : ::·::t'lEt'l 11 [RTN]
NaMe Type Len TiMe Date
REPORTS 0 20:20 06/05/84
EXPENSES T 42 20:20 06/05/84
CAT ALL II: ::<t'lEt'lII
Catalog all the files on the electronic disc, indented and sorted by level. The for directories is the level of the directory. The catalog produced by
Len field in the catalog line
CAT ALL II: ::-::t'lEt-1
11 does not show the time and date.
63
Keyword Dictionary
A
CAT ALL II: ::<t-1Et-1'1 [RTN]
NaMe Type Len TiMe
D [1
LE>::F I LE::;
P t'1::; C t'1 D S
PHOGPAt'1::;
D
D
L
BAPCODE
::; C A t·~ t·~ E P
COt'~F I G
D
E:
DATACOt'1t'1
HP:::[1[1(1
D
D 0 ~,~ t·~ LOA D
UPLO~iD
TEPt'1 I t'~AL
PHOt'~E D
1
2512
1
.-,
.:::.
E: :::[111
D
::!t.4
.-,
.:::.
B
.:.
'-'
13:::7
E: 5:::[1
B
B
2E.2t.
.-,
.:::.
E.5
1
3t5 D I ALEF.:
F.:EPOPTS
E ::.:: P E t·~ ::; E ::;
D
T
1
4'-'
• Refer to the HP-75 Owner's Manual and the HP-75 Reference Manual for further information.
Everything that applies to the use and behavior of CAT in main memory and on a mass storage device applies to the electronic disc as well.
Errors: 62, 63, 212
CDIGIT OFF
bar code statement
CDIGIT OFF
CDIGIT OFF
Turns off automatic check digit verification while scanning with the Code 39 and Code 11 decoders.
After CD I G I T OFF, check digit verification will not be performed by CODE:::'j$ or CODE 11 $ until
CD I G I T ot·~ is executed. The default check digit verification behavior after the HP-7 5 has been reset
([SHIFT] [CTL] [CLR])isCDIGIT OFF.
Errors: none
CDIGIT ON
I
CDIGIT
ot·~
bar code statement
CD1GIT ot·4
Turns on automatic check digit verification while scanning with the Code 39 and Code 11 decoders.
After CD 1 G 1 T [It'4, check digit verification will be performed by CODE:::'j$ or CODE 11 $ until
!.a
'~..,
64
rlt
] rs.
Itil t.
;e
]
·s.
~il et
Keyword Dictionary
CDIGIT OFF is executed. The default check digit verification behavior after the HP-7S has been reset ([SHIFT] [CTL] [CLR])isCDIGIT OFF.
Errors: none
CDV11
I
CD\,lll(IICode 11
LabeL")
bar code function
Verifies the check digit for a
Code
11
label
entered from the keyboard because the label cannot be scanned. Returns a 0 if the check digit of the label is not valid, or a 1 if the check digit is valid.
Errors: none
CDV39
I
CD 1 ,,.'::::'3 (
II
Code 39 Label
II ) bar code function
Verifies the check digit for a
Code 39 label
entered from the keyboard because the label cannot be scanned. Returns a 0 if the check digit of the label is not valid, or a 1 if it is valid.
Errors: none
CODE11$
I
CODEll$ bar code function
100 L$=CODEll$ ~ IF NOT LEN(L$) THEN 100
Scans a single Code 11 label. Returns the decoded label as a string of ASCII characters and issues a high tone if the label decoded successfully. Returns a null string and issues a low tone if the label did not decode successfully or if 2-1/2 minutes go by with no scanning.
If CD I G I T ot·~ has been specified, the decoder will calculate the check digit and compare it to the check digit scanned as part of the label (usually the last character of the label). The label will not decode successfully unless these two check digits match. If CD I G I T OFF has been specified, the check digit will not be computed or compared with the check digit in the label.
The longest label that can be decoded is 42 characters long, including the check digit. Labels longer than
42 characters will not decode successfully.
6S
F
Keyword Dictionary
Because CODE 11 $ requires a large amount of scratch space while it is executing (1400 bytes), there might not be enough memory available to execute CODE 11 $.
• During the 2-1/2 minutes while CODE 11 $ is waiting for a label to be scanned, the keyboard is disabled. Only the expiration of the time or the scanning of a label will stop the decoder-pressing the [ATTN] key will not. If CODE 11 $ is executed with an HP-7 SC installed in your HP 82718A rather than an HP-7SD, you will have to wait the 2-1/2 minutes for the decoder to halt, since the
HP-7SC has no wand connector and thus cannot scan labels. If you are waiting for CODE11$ to halt while running a program, press the [ATTN] key, and the program will halt as soon as the
2-1/2 minutes have passed.
Errors: 16
,
CODE39$
I
CODE:::9$ bar code function
100 L$=CODE39$ ~ IF NOT LEN(L$) THEN 100
Scans a single Code 39 label. Returns the decoded label as a string of ASCII characters and issues a high tone if the label decoded successfully. Returns a null string and issues a low tone if the label did not decode successfully or if 2-1/2 minutes go by with no scanning.
If CD I G I T ot·~ has been specified, the decoder will calculate the check digit and compare it to the check digit scanned as part of the label (usually the last character of the label). The label will not decode successfully unless these two check digits match. If CD I G I T OFF has been specified, the check digit will not be computed or compared with the check digit in the label.
The longest label that can be decoded is 42 characters long, including the check digit. Labels longer than
42 characters will not decode successfully.
Because CODE39$ requires a large amount of scratch space while it is executing (1400 bytes), there might not be enough memory available to execute CODE39$ .
• During the 2-1/2 minutes while CODE:::9$ is waiting for a label to be scanned, the keyboard is disabled. Only the expiration of the time or the scanning of a label will stop the decoder-pressing the [ATTN] key will not. If CODE39$ is executed with an HP-7SC installed in your HP 82718A rather than an HP-7SD, you will have to wait the 2-1/2 minutes for the decoder to halt, since the
HP-7SC has no wand connector and thus cannot scan labels. If you are waiting for CODE3'3$ to halt while running a program, press the [ATTN] key, and the program will halt as soon as the
2-1/2 minutes have passed.
Errors: 16
66
high d not o the ecode digit than there ard is essmg
718A
;e the
3$ to
LS the
:here
.rd is ssing
118A e the
$ to s the
tion
Keyword Dictionary
COpy
electronic disc
COP\'
....
"filename"
APPT
~:::E'l:::
- TO II
pathname:
;:<t'lEt'l"
"m:::lSS
storage file speoifier"
COP\'
-
" pathname:
::·::t'lEt'l"
"pathname:
;:.::t'lEt'll1 TO
II
-
filename"
AF'PT
KE\':::
II m:::lSS
II
storage file speoifier" pathname:
::.::t"1Et'lII
statement
COP\'
II
Do~,mLOAD
II
TO II .....
>
COP\' II Dm,mLOAD: ;:.::t'lH1" TO ": t'11"
Copies files within the electronic disc and between the electronic disc, the HP-75, and HP-IL mass storage devices.
• Files cannot be copied directly between the electronic disc and magnetic cards. To copy electronic disc files to (or from) cards, copy the files to main memory first, then from main memory to cards
(or to the electronic disc).
• When a file is copied to a new name, the file does not receive a new time and date in its catalog except when copying files from the electronic disc to a mass storage device.
• Refer to the HP-75 Owner's Manual and the HP-75 Reference Manual for further information.
With the above exceptions, everything that applies to the use and behavior of COP\' in main memory and on a mass storage device applies to the electronic disc as well,
Errors: 16,57,58,60,62,63,64,65,66,68,92,93,94,95,96,211, 212, 213
CREATE DIR electronic disc statement
CF.:EFITE D I F.: II
looation=
::<t'lEI"l"
CPEATE D I F.: II .. · ..
>
CPEATE D I F.: II HP:::C10[1: ::<t'lEt'l"
Creates a new directory on the electronic disc. The new directory will be the child of the directory specified by the
looation,
or the child of the current directory. This is the only way to create a new directory. No more than six levels of directories can be created.
Errors: 1 6, 62, 63, 21 2, 21 3
67
Keyword Dictionary
DIR IS
electronic disc statement
D I F.: I :::
II
location:
::·::t'1Et'1 11
D I F.: I S
II •••••
> PPOGPAt'1S> DATACOt'1t'1> HP:::OO~J: ::<t'1Et'1 11
D I F.: I S
II
HP:::OOO: ::·::t'1Et'1 11
Specifies the current directory. This is the only command that can change the current directory. If wild cards are used, D I F.: I S will only match directories; it will skip over files when trying to find a match.
Once a directory is specified, subsequent use of filenames only, rather than pathnames, will cause files to be created and opened (assigned to) as children of the specified directory.
Errors: 63, 21 2
FRAME?
high-level modem function
F F.: FIt'1 E ?
Checks for a framing error. Returns a 0 if the last t'10D I t·U had no framing error, or a 1 if there was a framing error. Remember that t'10D I t'~$ returns not only the contents of the modem receive buffer, but also any data echoed by t'10DOUT. FF.:At'1E? reports a framing error for data returned by t'10D ItU from either source.
Errors: 150, 151, 153
HOOK?
high-level modem function
HOOK?
IF t·WT HOOK? THEt·~ D I SP
II t'1odefol on-hook
II
Checks if modem is on-hook. Returns a 0 if the modem is on-hook (not on phone line), or a 1 if the modem is off - hook (using phone line).
If the modem is pulse dialing, HOOK? should not be used until after dialing has been completed. 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.
Errors: 1 50, 1 51, 1 53
II
68
ion
] is a but tH: lon
] the lIse ed. rue ent
] wild tch. s to
Keyword Dictionary
INITIALIZE ":MODM"
I
HH T I AL I ZE II: t'10Dfo1" high-level modem statement
INITIALIZE
II: t'10Dt'1 11
Resets the modem to its default state (shown below) and turns it off. I t·~ I T I AL I ZE II: t'l0 Dt'lII , which takes about 18 s to execute, can be used even if the modem is off, and will always reset the modem to its default state, even if the modem is deadlocked (see "Modem Dead10ck" in Section 2).
Parameter or Mode Default Condition
Ring count
Command echoing
Pari ty
Data echoing
Modem hung up
Handshake protocol
Parity stripped
Chars stripped
Block size
Handshake chars
Response length
MODEM or VOICE mode
Command character
Transmit buffer
Receive buffer
Cmd char is data
(UNLISTEN) o yes none no yes
Transmitter XON/XOFF
Receiver XON/XOFF
Receiver ENQ/ACK no none
32 bytes
QSQSQ long
MODEM
% cleared cleared no
Note:
Q
(p~n and § represents control-S (pq~)
Equivalent Low-
Level Command
C 0
E 0
F 4
G 0
H
L 0
M
N % none
Z none
• H4I T I AL I ZE II : t'10Dt'1" must be used instead of the I command if the command character is not known, or if U
(UNLISTEN) command).
(INITIALIZE) low-level modem o has been executed (see the U
• If the modem is bad and reports the F AI L response when the modem is turned on,
II: t'10Dt'1" will continue to execute until you press [ATTN].
I t·~ I T I A L I ZE
Errors: 1 51
69
Keyword Dictionary
INITIALIZE ":XMEM"
I
ItH T I AL I ZE ": ::-::t'1Et-1'1 electron ic disc statement
I t·~ I T I AL I ZE
I I :
>::t'1Et'1"
Resets the electronic disc to its default state. All files and directories will be erased. The root directory
C··) will be created at the beginning of the file system at this time. If you need to know when the electronic disc was initialized, examine the time and date fields of the catalog returned by ::-:: C AT $'::
[1).
Refer to "Electronic Disc Initialization" in Section 2 for information about other times that the electronic disc is initialized.
Errors: 17,63, 94, t'1Et'1I C d i dn
I t. se 1 ect.
MAX XMEM
electronic disc function
V
11
S'
CI
P
Ci
1 o tl
Returns total amount of memory on the electronic disc. This amount will be either :::276::: (HP 827l8A
Option 032) or 655:::6 (HP 82718A Option 064),
Errors: 212
MODEM OFF
I t'IODEt'1 OFF high-level modem statement t'10DEt'1 OFF
Turns the modem off. The modem is also turned off by turning off the HP-75 and by I t·~ I T I AL I ZE
": t'1ODt'1". If a program halts prematurely before it has a chance to turn off the modem, the modem will continue to consume battery power until you turn the modem off or until the HP-7 5 is turned off (or turns itself off). t'10DEt'1 OFF (and turning off the HP-75) will always turn the modem off, even if the modem is deadlocked (see "Modem Deadlock" in Section 2). When the modem is off, I t·~ I T I AL I ZE
": t'1ODt'1", t'10DEI"1 OF F, and t'10DEt'1 Ot·~ are the only high-level modem commands that can be executed. Any dial string saved by the 0, R, or X low-level modem commands will be lost when the modem is turned off, and will have to be reentered after the modem is turned on.
• If the HP-75 ::;TAt·mB'r' Ot·~ command is executed while the modem is on, the HP-75 will not turn itself off, and the modem will consume battery power continuously.
Errors: 151
A o
D:
R« th th
Er
[
70
t
]
:m
:or he
:E be he lOt y iC
A
]
Keyword Dictionary
MODEM ON
I t'10D E t'1 0
t·~
high-level modem statement t'10DEt'1 0 t·~
Turns the modem on. t'10DEt'1 Ot·~ needs only be executed once each time the HP-75 is turned on. Once on, the modem will remain on until t'10DEt'1 OF F or ItH T I AL I ZE II: t'lODt'1" is executed, or until the HP-7 5 is turned off (or turns itself off).
When the modem is turned on, it performs a self -test. If the test fails, the modem reports %F AIL or %9.
If the test passes, the modem reports %OK or %4 (%4 followed by a space--see "Turning the Modem On" in
Section 2). The command character will be setto
%, the modem will be in MODEM mode and on-hook, and command characters will be processed normally (see the U (UN LISTEN) command). The following parameters will be restored to their most recent settings (the letter in parentheses is the low-level command that sets the parameter):
Modem Parameters
Restored at Power On
Ring count (C)
Command echoing (E)
Data format (parity) (F)
Data echoing (G)
Handshake protocol (K)
Response length (L)
Additionally, the transmit and receive buffers are cleared. If the modem is already on, however,
Ot·~ has no effect-no parameters or buffers are changed. t'1ODEt'1
Errors: 151, 152
MODIN$
I t'10DH·\$ high-level modem function
[i:t=t'10D I tH:
Reads data from the modem receive buffer. Returns a string containing not only the current contents of the receive buffer, but also whatever data was saved by t'1ODOUT (see t'10DOUT). Returns a null string if there is no data from either location.
Errors: 1 6, 1 50, 1 5 1, 1 53
71
Keyword Dictionary
MODOUT
I t'10DOUT
II
string
ll high-level modem statement t'10DOUT D$
Sends the string to the modem transmit buffer. If the string contains just data, the data is transmitted out the phone line. If the string includes low-level modem commands, those commands are not transmitted, but are processed locally by the modem. t'10DOUT also reads the modem receive buffer and saves its contents in the HP-75 to prevent the possibility of overflowing the buffer from echoed data or commands (see "MODOUT and Echoed Data" and "MODOUT and Out of Memory" in Section 2) .
• t'10DOUT waits until the transmit buffer is ready to accept data before sending anything to the modem. If the modem is deadlocked, t'10DOUT will wait forever. (see "Modem Deadlock" in
Section 2). Once t'10DOUT starts to wait, you can halt it by pressing [ATTN] (a low battery condition in the HP-75 will halt it as well). Then t'10DEt'1 OFF, turning the HP-75 off, or
I t·~ I T I AL I ZE
I I : t'10Dt'1" will clear the deadlocked condition.
If you expect a deadlock, you can use PEAD'y'? to identify that condition before t'10DOUT begins to wait forever. If deadlock is of great concern, your program should only send one character at a time to the modem with t'10DOUT, waiting before each character is sent until PEAD\'? =1.
Errors: I 6, I 50, 1 5 1, 1 5 3
PARITY?
I
PAfUT\'? high-level modem function
Checks for a parity error. Returns a 0 if the last t'10D I t·U had no parity error, or a 1 if there was a parity error. Remember that also any data echoed by t'10D I t·~$ returns not only the contents of the modem receive buffer, but t'1ODOUT. PAF.: I T\'? reports a parity error for data returned by t'1CID
au
from either source.
Errors: 1 50, 1 51, 1 53
#
electronic disc
F'P
P F.: un
# file number [, line number] un
# file number , line number
print list
statement
PPINT # 1,1000 ; S$
Prints the items in the specified line. If the
print list
to the electronic disc file specified by
file number
at the next or
prin t list
is omitted, deletes the specified line, but leaves the data pointer positioned at the beginning of the specified line.
72
t e n y
Ir
IS a d
It d a
It
$
] t
1
) r
~r
Keyword Dicttonary
• Using F'F.: I t·n #, you might create a file on the electronic disc that will be too big to fit into
HP-75 main memory. The maximum number of lines in a file created on the electronic disc is
10,000.
• Refer to the HP-75 Owner's Manual and the HP-75 Reference Manual for further information.
Everything that applies to the use and behavior of F'F.: I tn # in main memory applies to the electronic disc as well.
Errors: 16,28,34,45,51,62,65,90,211,212
PURGE
I
F'UPC:iE II
pathnarne:
::·::t·1Et·1 11 electronic disc statement
PUPC:iE II ..... :> F'P 0 C:i Pt'it'1::::> CO t·~ F I C:i: ::.:: t'1 E t'1 11
PUF.:GE
II
UF'LOAD: ::<I"1E}1 11
Deletes from the electronic disc all files that match the
PUFU:;E DIP.
pathnarne.
Does not delete directories-flee
• Because pathnames allow the use of wild cards in filenames, you might purge many files
11 inadvertently-for example, F'tJPC:iE II --.------: >::t-1Et'1 will purge all files on the electronic disc. Unless you are sure which files will be deleted with F'UF::GE, you should use PEt·WI· ... E to delete files when using wild cards.
• Refer to the HP-75 Owner's Manual and the HP-75 Reference Manual for further information.
Everything that applies to the use and behavior of F'UF.:C:iE in main memory and on a mass storage device applies to the electronic disc as well.
Errors: 62, 6 3, 212
PURGE DIR
electronic disc statement
F'UPC:iE DIP II
location:
::<t'1Et'1 11
PUPC:iE D I F.: II .. · .. > PPOC:iPAt'1::;> m'iTFlcor·1t{> HF':::OOO: ::.::t'1Et'1II
F'UF.:C:iE D I F.: II HF':::OI]I]: ;:.::t'1Et'1"
Deletes directory and child files from electronic disc. The root directory····· cannot be purged. If you want to delete every file on the electronic disc, use I t·~ I T I AL I ZE II: >::t'1Et'1 11
•
If the current directory is deleted, the current directory will be set to ..... .
• PUPGE DIP is even more dangerous than F'UPC:iE, because purging a directory removes its child files and directories as well. Because of this danger, wild cards are not allowed in the directory name specified for F'UF.:C:iE D I F.:.
Errors: 6 2, 6 3, 2 1 2
73
Keyword Dictionary
READ
#
electronic disc statement
F.:EAD
F.:EAD
#
file number
[~line
number]
#
file
number~
line number read list
READ # 1~1000 ; S$
Reads data from an electronic disc file and assigns the data to the variables in the
read list.
If the
read list
is omitted, positions the data pointer to the beginning of the specified line .
• In certain instances when F.:EAD
The next random F.:EAD
# generates an error condition on an electronic disc file, the data pointer will be positioned to the wrong line. For example, suppose F.:EAD #
E F.: F.: 0 F.: : no dat..~ because t·~ is an invalid
line number
1, t·~ ; ::.:: produces for the specified electronic disc file.
# of that file (i. e., no
line number,
as in F.:EAD # 1 ; ~·O will read the first item on the first line of the file. If this same operation were done on a file in HP-75 main memory, the random F.:EAD # would read the first item on the line after the invalid
line number.
Rather than relying on the data pointer after an error occurs, use F.:ESTOF.:E # to position the data pointer to the desired location .
• Refer to the HP-75 Owner's Manual and the HP-75 Reference Manual for further information
With the above exception, everything that applies to the use and behavior of READ memory applies to the electronic disc as well.
# in main
Errors: 16,33,34,45,62,65,90,212
READY?
F.:EAD\·? high-level modem function
100 IF READY? THEN MODOUT OS ELSE 100
Checks to see if the modem transmit buffer is ready to accept data from the HP-75. Returns a 0 if modem is not ready for data, or a 1 if the modem is ready for data. F.:EAD .... ·? therefore identifies modem deadlock (see "Modem Deadlock" in Section 2).
Errors: 1 50, 1 5 I, 1 53
REMOVE
F.:Et·10'·/E
"pathname:
>::t'lEt'l" electronic disc statement
See below for examples.
F.:Et·lO'· ... E behaves like PUF.:GE except that you are asked specifically whether each file should be deleted.
For example, if the file DO~·mLOAD is to be purged, the message PI"W'de DOW·~LOAD?
[t·~ ~ ..... ~ ATTt·~] will appear. If you press [y] or [Y], the word '/es will be echoed and the file will be
74
E
F
F
Keyword Dictionary purged. If you press [n] or [N] (actually, anything other than [y] or [Y]), the word t·k, will be echoed and the file will not be purged. If you press [ATTN], the word t·k, will be echoed and PEt'1O'."IE will end.
This process is repeated for each file defined by the
pathname.
In contrast to F'UPGE, the real power of PEt'10 "/E is in the use of wild cards. For example, F.:Et'10 ',/E
"--------: ::<t'lEt'l" will try to delete all files on the electronic disc, asking you before each one is purged. The examples below are based on the file system illustrated in "Electronic Disc Software" in
Section 2.
F.:Et'1O "/E ,,--------: ::<t'lEt'l" [RTN]
PW-ge P t'1 ::; C t'1 D ::; ? [t.~, 'r' , A T n·n
I'(es
Pw-'~e ::; C A t·~ t'~E F.:? n~, 'r' , A rn~ ['~o
Pun;:~e CO['~F I G? [H, \', FITTI"~J
[··10
F.:EI"10 ',/E "DATACOt'1t{> --------: ::< t'1 Et'1 " [RTN]
Purge TEPMINAL? [N,Y,ATTNJ No
F.:EI"10 ',/E "DI~TACOt'1I'{>?> - --.----.- : ::':}1Et'1"
[RTN]
Purge
Purge
Purge
DOWNLOAD? [N,Y,ATTNJ No
UPLOAD? [H,Y,ATTHJ No
TEPMINAL? [N,Y,ATTNJ No
Purge all files on the electronic disc
[y] pressed
[n] pressed
[ATTN] pressed.
P E t'1 0 '",' E ends and
Purge files in d.:':I t
.:':I cor', r', directory the
[ n ] pressed, and P E t'1 0 1,/ E ends since there are no more files in the d.:':lt. .3cor'wr directory
Purge files in the d.:':l t
.:':1 cor', r', directory and in any child directories. Notice that you are not asked to purge the hp:::OOO directory itself--only its child files.
[n] pressed
[n] pressed
[n] pressed, and F.: E t'lCr',/E ends since there are no more files in the hF':::OOO directory
• I?Et'1Cr ',/E can also be used for files in HP-75 main memory. This is the only time wild cards can be used to reference filenames in HP-7 5 main memory.
Errors: 62, 63, 21 2
75
Keyword Dictionary
RENAME electronic disc
PEt'lAt'1E
PEt'lAt'1E
"old pathname [:
::·::t'1Et'1]
II
TO
II
nebJ pathname:
::·::t'1Et'1"
11
"old pathname:
::·::t'1Et'1 TO
"nebJ pathname [:
::·::t'1Et'1] statement
See below for examples.
Changes the name of a file or directory on the electronic disc. F.:Et·lAt'1E can also move a file to a new location, or move a directory and all its child files to a new location. The
old pathname
defaults to the current directory. The root directory····· cannot be renamed. The examples below are based on the file system illustrated in "Electronic Disc Software" in Section 2.
F.:Et·lAt'1E " .....
>
II
!:;Et·m"
Renames U F' LOA
[I to !:HlD
F.:E t·l A t'1 E "D AHiCot'H'1 : ::.:: t'1 E t'1" TO" F.:E F'O F.: T!:;> : ::·::t'1 Et'1 11
Renames U F' LOA [I to !:HlD
Moves the entire subtree starting at the d.::tt. ·::tcor'1f'1 directory to a subtree under the t-
e
p 0 tt. s directory
• Refer to the HP-75 Owner's Manual and the HP-75 Reference Manual for further information.
Everything that applies to the use and behavior of PEt'lAt'1E in main memory and on a mass storage device applies to the electronic disc as well.
Errors: 62,63,64,65,68,212,213
RESTORE
#
electronic disc statement
PE!:;TOPE #
file number [, line number]
RESTORE # 1,1000
Moves the data pointer in the data file specified by lowest-numbered statement in the file .
fi le number
to the beginning of the specified or
• Refer to the HP-75 Owner's Manual and the HP-75 Reference Manual for further information.
Everything that applies to the use and behavior of PE!:;TOF.:E # in main memory applies to the electronic disc as well.
Errors: 34,45,62,65,212 xc
[
Re dir nu ro( las thl ha ch
El x
F
I
76
Keyword Dictionary function
XCAT$
I
::<CAT:t
(number)
electronic disc
)r
1.
Le t
]
~e
~r
1. ss
1 w le
Ie
Returns the catalog of the
numberth
file or directory on the electronic disc. The
number
of the file or directory is the position of the file in a CAT ALL II: ::<t'·IH1" listing. If
number
is greater than the number of files and directories on the electronic disc or less than root directory is number O.
0, ::·::CAT$ returns a null string. The
::·::CAT$
(0) returns a catalog that identifies when the electronic disc was last initialized, since the root directory is only created at that time. The format of the returned string is the same as the HP-75's OiT$(
number)
function, except that the tenth character of the ::·::CAT$ string has the level of the file or directory (note that directories also have the level in the length field at character 1 7).
Errors: 212
XDIR$
electronic disc function
::<D I F.:$
Returns the catalog of the current directory on the electronic disc.
Errors: 212
XMEM
I
::< t'l E t'l electronic disc function
Returns the amount of memory remaining on the electronic disc.
Errors: 212
':
II
I
I
: ,Ii,
,j:'i
II
I
,~
'i
I r
77
Ser spe eqt stri
Re~
A
[ t'1 C
Ph wa
CO
MO bac
Re
B
[
Tl
Fi pa ne
Fi
N< co:
[
LOW-LEVEL MODEM
__
III
~~
This section describes all the low-level modem commands provided by the HP 82718A Expansion Pod.
First, the name of the command is given. The next line lists the syntax of the command and its expected parameters. An example of the use of the command follows. The description of the command appears next, and includes any cautions, set off by bullets, that should be observed when using the command.
Finally, a list of possible responses that may be reported by the command is given.
Notes on syntax: Optional parameters are surrounded with brackets ([ command character is %.
D. All examples assume the
A (ANSWER)
t'10[lOUT
II
~'~A
II
:~.:CHF.:$':: 1 :::::.
Places the modem in ANSWER mode, takes the modem off-hook, transmits the answer carrier tone, and waits about 20 s for an originate tone. If the modem receives a originate tone before the 20 s expires, the
CONNECT response is reported. If not, NO ANS is reported and the modem goes back on -hook and into
MODEM mode. If the modem receives a carrier that is not in the answer band, it reports BAD ANS, and goes back on-hook and into MODEM mode.
Responses: 1, 2, B
B
(BREAK)
I
B
duration
t'10[lOUT
II
~'~E: 4
II
:~.:CI·-IF~:$':: 1 :::::.
Sends a break (binary zero, or long-space disconnect). The
duration
is a single hex digit (O-F) that specifies the number of 250-ms intervals during which the break will be sent (0-15 intervals, which equals 0 to 3. 75 s). To send a break longer than 3. 75 s, use more than one B command in the command string. If the modem is in VOICE mode, the B command will just wait for the duration of the break.
Responses: none
79
Low-Level Modem Command Dictionary
C (COUNT)
I
C
ring count
t'10DOUT
II
~·~C 2
II
:~.:CHF.:$':: 1 :::)
Sets the
ring count.
The
ring count
is a single hex digit (a-F) that specifies either the number of rings (0-15) to wait before answering an incoming call, or the number of rings to wait before aborting a dialing operation. The
ring count
is set to a when the modem is initialized, and its current value is preserved while the modem is off.
If the modem is on-hook and in MODEM mode, it will answer an incoming call after
After each incoming ring, the modem will report RING IN and OK. After
ring count
rings.
ring count
rings have been detected, the modem will automatically report RING IN, go off-hook (i.e., answer the incoming call, and enter ANSWER mode. The behavior at this point is as if the A (ANSWER) command was executed. See the
A command for details.
If
ring count
is zero, the modem will be ORIGINATE-ONLY when in MODEM mode; each incoming ring will be reported, but the incoming call will not be answered. Only if
ring count
is a number other than zero will the modem be AUTO-ANSWER when in MODEM mode, and answer the incoming call.
If the modem is on -hook and in VOICE mode, it will not answer incoming calls. However, after each incoming ring, the modem will report RING IN and OK, regardless of the value of
ring count.
The P
(PICKUP) command can be used to answer the incoming call in VOICE mode.
While the modem is counting incoming rings, any command sent to the modem will cause the modem to restart counting incoming rings (in effect, extending the
ring count).
The
ring count
is also used when dialing. When dialing, the modem will wait
ring count
+ 4 rings before aborting the dialing operation. Refer to the D (DIAL) and R (REDIAL) commands.
Responses: none
D (DIAL)
I
D
[dial string]
t'10DOUT
II
\D I 9~'J 1':: :::00) 555-1212
II
:U=:HF~:$':: 1:::::'
Takes the modem off -hook and dials a sequence of numbers. If you have already stored a dial string using one of the the three D, R (REDIAL), or X (XMIT), the string is an optional parameter; the D command will dial the most-recently entered dial string. If no dial string has been stored since the modem was last turned on or initialized, or if the last dialing command containing a dial string was aborted, the dial string is a required parameter.
A dial string can contain any number of characters, but only the first 32 recognized characters will be dialed or stored. The dial string recognizes several special characters, listed below. All other characters are ignored except for the characters related to low -level command strings:
'as control-H), g~~ (cancel-ASCII 24 or control-X), comma, and carriage return .......... .
(backspace-ASCII 8 or
80
e
's
Ir g
D e
. s
Low-Level Modem Command Dictionary
Characters
0-9,#,*
I p
Meaning
Digi ts to be dialed.
The following digits, until the next P or W, should be dialed using interrupt (pulse) dialing. The I should be preceded by a P if you want the modem to detect no dial tone and report the NO DIAL response.
Wait for dial tone, then resume dialing using adaptive dialing. If no dial tone is detected within the timeout, the dial command will be aborted, and the NO DIAL response will be reported. The dial string will be executed as if the first character was a P unless it has a P or
W
The timeout is 3 s for an implied P, and 4. 5 s for a P that actually appears in the dial string. These times consist of a 2 s delay, followed by detection of a continuous dial tone for the remainder of the timeout.
Wait for 5 s, then resume dialing next part of string using tones.
After the modem dials, it begins to look for a busy signal or a ring. The modem response depends on the mode it was in when dialing commenced. If the modem was in VOICE mode, it waits until it determines that the line is not busy, then responds with CONNECT. It may respond with RING first. Then the modem will remain off-hook regardless of the status of the called phone (which will continue to ring). If the line is busy, the modem goes on - hook and responds with BUSY.
If the modem is in MODEM mode, it dials as above, then continues to monitor the status of the line. If a busy signal is detected, it hangs up and responds with BUSY. If a carrier is detected, the modem enters
ORIGINATE mode. The behavior at this point is as if the 0 (ORIGINATE) command was executed. See the 0 command for details.
If command echoing is enabled (E 0), the modem will echo the dial string when it receives the command string containing it. The dial string will be echoed in exactly the same form as it appeared in the command string. The modem will echo the dial string again each time it is dialed by any of the three dialing commands. The D and X commands echo the string once (unless they are repeated in the command string--flee below). The R command echoes it up to 10 times as it redia Is.
The dial string echoed during dialing will be in a different form than m the command string. Characters that are ignored in the dial string are not echoed. The special characters P and W will not be echoed, but will break the dial string into segments separated by spaces. Echoing will stop for the duration of the waits imposed by those characters. The special character I will not be echoed, but will cause all digits between the I and the next P or W (or the end of the dial string) to be echoed. The digits # and
*
will be echoed as ; and <. There will be a trailing space but no carriage return or line feed after the entire dial string has been echoed .
A low-level command string can contain multiple dialing commands, but it probably will not have the behavior you expect. All the dialing commands are counted, and their dial strings are concatenated together. If the dialing operation results in a BUSY response, the operation will be repeated for the number of times that there are dialing commands, up to a maximum of ten times per command (D, R, or
X). Because X depends on VOICE or MODEM mode, and only partially checks line status, multiple X
81
...................
-------------------------------
Low-Level Modem Command Dictionary commands may behave in an unexpected manner. In general, the behavior of multiple dialing commands is unusual enough that it should be avoided.
Responses: 0, I, 2, 3, S, B
E (ECHO)
I
E
eoho specifier
t'10DOUT
II
\E 111 tCHF.::t ( 1 :::)
Enables and disables echoing of low-level modem commands. E 0 enables command echoing--all low-level commands will be echoed back to the HP-7 S by the modem (actually echoed into the receive buffer for t'lOD I t·~:t to read). E 1 disables command echoing (the carriage return that ends the command will still be echoed as a carriage return-line feed). The
eoho specifier
is set to 0 when the modem is initialized, and its current value is preserved while the modem is off.
Responses: none
F (FORMAT)
I
F
format speoifier
t'10DOUT
II
~'~F :::
II tCHF.::t ( 1 :::)
Sets the data format-parity and data length. The specifies the parity and data length. The
format specifier
is a single digit (0-4) that
format speoifier
is set to 4 when the modem is initialized, and its current value is preserved while the modem is off. The
format speoifier
has these meanings:
Format
Specifier
0
1
2
3
4
Parity
Always 1 (mark)
Always 0 (space)
Odd
Even
None
Data Length
7
7
7
7
8 bits bits bits bits bits
The modem generates parity for all data that is transmitted according to the above table. If the high-order bit of a data byte is set, the parity will be generated with the opposite sense. Consequently, if you need to send legitimate 8-bit data, you should only use F 4, and you will not be able to check parity.
The modem checks for parity errors in all data received for
format speoifiers
0, 1, 2, and 3. If a parity error is detected, it can be identified with the PAr::: I T\'? high-level modem command. If bit 3 of
JS2
(the second KONTROL parameter) is clear, parity errors will also be flagged by setting the high -order bit of the bad data byte. In that case the bad data will appear underlined in the HP-7 S display or in inverse
82
: the
Jy, if
·ity.
Ifa
3 of
:r bit verse rlands
:--e.ll
:ceive mand em is that lized,
19S:
Low-Level Modem Command Dictionary video on a video monitor. If bit 3 of ~g is set, parity errors will not be flagged in that manner-the high-order bit will be cleared for all
7~bit data received. Only PAP I T\'? can identify parity errors if bit 3 of 1<2 is set.
Responses: none
G (GIVEBACK)
I
G
gi~ebaok
speoifier
t'1ODOUT
II
~'~G 1" g:CHF.::.t ( 1 :::)
Enables and disables echoing of data. G 0 disables data echoing. In this state, data will be echoed back to the HP-7 5 only if the host computer is "full duplex". G 1 enables data echoing for operation with "half duplex" computers. All data will be echoed back to the HP-7S by the modem (actually echoed into the receive buffer for t'10D I r-l$ to read). The
givebaok specifier
is set to 0 when the modem is initialized, and its current value is preserved while the modem is off.
Responses: none
H (HANGUP)
H t'1ODOUT
II
~'~H" :~.:CHF.:$ ( 1:::)
Hangs up the modem. Places the modem on-hook and ends the communication session. The H command takes a total of 3 s to place the modem on-hook. If the modem is in MODEM mode, H sends a break for 2 of the 3 s, then places the modem on-hook.
Responses: none
I (INITIALIZE)
t'1DDOUT
II
:.~ I
II
:~.:CHf~:~t ( 1 :::)
Resets the modem to its default state, shown in the table with the nn
T I AL I ZE " : t'10Dt'1" high-level modem command in the "Keyword Dictionary". If command echoing is enabled (E 0), I is echoed as this command string:
C O,E O,F 4,G O,H,K E03qSQ$q,L O,M,N 10
83
Low-Level Modem Command Dictionary
Note: Q represents control-Q (~:~) and § represents control-S (~~)
• The I command will not reset the modem to its default state if the modem is deadlocked (see
"Modem Deadlock" in Section 2).
• ItH T I AL I ZE " : t'1ODt'1" must be used instead of the I command if the command character is not known or if U
(UN LISTEN ) command).
(INITIALIZE) low-level modem o has been executed (see the U
Responses: none
K (KONTROL)
I
K
handshake protocol specifier
CS=CHRS(17)tCHRS(19)tCHRS(17)RCHR$(19)RCHRS(17) t'10DClUT
II
~'~K E~]::::
II g.:CSg.:CHF.:S ( 1 ::::)
Sets the serial handshake protocol. The
handshake protocol specifier
consists of 8 single-byte parameters, called JK~-~~. The first three parameters determine the handshake protocol, parity error behavior, and receive buffer block size. Each of these three parameters are single hex digits (a-F), defined by setting or clearing its component bits according to the particular requirements of your application. All the bits taken together constitute the single hex digit for that parameter. (In the descriptions below, note that bits are numbered a to 3, from right to left.) The last five parameters are definable characters that are used in conjunction with the different handshake protocols. Each of the last five parameters can be any 7-bit ASCII character except l~ (backspace-ASCII 8 or control-H), ~,~~ (cancel-ASCII 24 or control-X), comma, or carriage return. Note that since these are 7 - bit characters, they will not be recognized as protocol or strip characters if they appear with a parity error.
Character Bit
bit 2 bit I bit 0
Description
Transmi t ter XON/XOFF Protocol. A received ~p character will halt data transmission by the modem, and a received ~~ character will restart da ta transmission by the modem.
Receiver XON/XOFF Protocol. When the number of bytes in the receive buffer exceeds the block size, the modem will transmit a
K] character. When the number of bytes in the receive buffer drops to zero, the modem will transmit a ~~ character.
Receiver ENQ/ ACK ProtocoL The modem will respond to a received
~~q with an ~~~ when its receive buffer becomes empty.
Transmitter ENQ/ACK Protocol. When transmitting, the modem will transmit an ~Nq character after sending
block size
characters, and stop transmitting. The modem will resume transmitting when an ~¢~ is received.
$
84
e
Ir d
II
. e
It
It rt
11
)p is
0,
:d e
11
U
Low-Level Modem Command Dictionary bit 3 bit 2 bit 1 bit 0 bit 3 bits 2-0
Strip Parity. If this bit is set, the modem will strip off the parity bit of incoming data bytes for all 7-bit data formats (F 0-3). If this bit is clear, the modem will show parity errors by setting the parity bit for any data bytes with a parity error.
St rip ~~. If this bit is set, the modem will strip off any received ~~ characters from the received data stream.
St rip ~b. If this bit is set, the modem will strip off any received P~b
(ASCII li7) characters from the received data stream. . ............. .
St rip
(ASCII
HUL.
If this bit is set, the modem will strip off any received
0) ch.aracters from the received data stream.
HQ~
. .......... .
Prompt Mode. Whenever the modem transmits a transmitting until it receives a
~4 is not the same as ea, it will stop
J<4 character from the remote computer. If
K?, the modem will strip off any
J<S characters received between the carriage return and the
R4
character. Prompt Mode has higher priority than Transmitter XON/XOFF Protocol.
Bu ffe r Pa rt it The receive buffer
block size
is 8*(1
+buffer parti t ion).
The
block size
is used in Receiver XON/XOFF Protocol to specify when the modem should transmit a ~§ character, and in
Transmitter ENQ/ ACK Protocol to specify how often the modem should transmit an ~NQ character .
If the receive buffer overflows, received data is ignored until the number of bytes in the receive buffer drops below 56. Then the buffer overflow response (OV) is placed in the buffer, and receiving continues.
Transmitter XON/XOFF Ready Character and Prompt Character.
Transmitter XON/XOFF Not Ready Character.
Receiver XON/XOFF Ready Character.
Receiver XON/XOFF Not Ready Character.
Strip Character.
All eight parameters taken together constitute the
handshake protocol specifier.
The eight parameters are set to E039~9:$9 when the modem is initialized, where
9 represents control-Q (~n and ~ represents control-S (pq~). Their current values are preserved while the modem is off.
• The modem will behave unpredictably if ~4-K~ are defined as the command character.
• The K command specifies handshake protocols that can cause modem deadlock. If you are using
Transmitter XON/XOFF, Transmitter ENQ/ ACK, or Prompt Mode protocols, you should write your program so that it can detect and respond to deadlock. K will not change protocols if the modem is deadlocked (see "Modem Deadlock" in Section 2).
Responses: none
8S
I
n
Low-Level Modem Command Dictionary
L (LONG)
I
L
response specifier
t'10DOUT
II
~'~L 111 :~.:CHP$':: 1 :::::.
Specifies long or short echoing of low-level modem responses. L 0 specifies long echoing--a.ll responses are spelled out and followed by a carriage return-line feed. L 1 specifies short echoing--a.ll responses are single ASCII hex digits between 0 and B.
The low-level responses, in the two lengths, are as follows:
Long Short
Response Response
ABORT
BAD ANS
BUSY
CONNECT
CONN LOST
FAIL
NO ANS
NO DIAL
OK
OV
RING
RING IN
4
OV
5
7
1
8
9
2
3
A
B
0
The
response specifier
is set to 0 when the modem is initialized, and its current value is preserved while the modem is off. See appendix D, "HP 82 718A Errors and Responses", for the meanings of the responses, commands that report them, and the exact sequence of characters that will be reported.
Responses: none
M (MODEM)
t'10DOUT
II
\t'1
11
:~.:CHF::$':: 1 :::::.
Places the modem in MODEM mode. The modem will monitor the phone line to determine the line status.
If the modem was already in MODEM mode and a valid data connection was already established when this command was entered, then the modem will return the CONNECT response.
If the modem was in VOICE mode and the voice connection had already been made, the modem will enter
ORIGINATE mode. The behavior at this point is as if the 0 (ORIGINATE) command was executed. See
86
.s .
.is er
~e
] ed he
] ses lre
Low-Level Modem Command Dictionary the 0 command for details. If the modem was in VOICE mode and no voice connection had yet been made, the modem will enter MODEM mode and remain on-hook. In this case, no response is returned.
• If you attempt to enter MODEM mode when the modem is off-hook, the modem will enter either
ANSWER or ORIGINATE mode depending on whichever was the last mode the modem operated in.
When off-hook, either hang up the modem before executing M, or use the A (ANSWER) or 0
(ORIGINATE) commands to define explicitly the off-hook mode you want to enter.
Responses: 0, I, 2, 3, 5, B
N (NEW)
I
N
command character
t'10DOUT
II
~.~~.~ !
II
:~.:CHF.:$
0::
1 :::)
Changes the low-level modem command character to a new value. The command character can be any
7-bit ASCII character except .~~. (backspace-ASCII 8 or control-H), CAN (cancel-ASCII 24 or control-X), comma, and carriage return. The command character is set to % or initialized, and is not preserved while the modem is off.
Responses: none o
(ORIGINATE)
t'10DOUT
II
\0
II
:~.:CHF.:$ ( 1 :::)
Takes the modem off-hook and places it into ORIGINATE mode. The modem then monitors the phone line to determine its status. If the modem was already off -hook and detects an answer tone, it issues an originate tone and reports CONNECT. If no answer tone is detected within about SO s, the modem reports
BAD ANS (out-of-frequency answer tone) or NO ANS (no dial tone or an unsteady tone). If the modem hears a dial tone when the 0 command is executed, it will wait about 7 s, then report BAD ANS. If the modem detects a busy signal from a previous dialing operation, it reports BUSY.
If the modem detects a ring from a previous dialing operation, it starts counting rings and reports RI NG after each one. If the maximum number of rings is exceeded (the ring count + 4, up to a limit of nine), or if no answer tone is received within SO s after the last dialing operation ended, the modem reports NO
ANS. If an answer tone is detected, the modem issues an originate tone and reports CONNECT.
After the BAD ANS, BUSY, or NO ANS responses are reported, the modem goes on-hook and into MODEM mode.
The significance of the BAD ANS and NO ANS responses as they relate to dialing is explained in "Adaptive
Dialing" in Section 2.
Responses: 0, I, 2, 5, B
87
7
Low-Level Modem Command Dictionary
P (PICKUP)
p
Takes modem off -hook (picks it up) and places it in set the modem into the proper mode for the
VOICE
mode. The P command can be used either to
X (XMIT) command, or to answer an incoming call in
VOICE
mode.
Responses: none
Q (QUERY)
Q t'10D OUT
II
\0
II
:~.:CHP$ ( 1:::) modem returns this status information in the form of two status, and operating mode. The
Asks the modem for information on ring count, data communication or three single-character codes, preceded by the command character, as follows:
Character 1 Character 2 Character 3 Character 4
Lomm.nd
cha racte r
lRing count
(O-F)
V
=
VOICE mode
nothing
=
MODEM mode
Phone line status
H
= on-hook
C =
off-hook, carrier detected
N
(data communication)
=
off-hook, VOICE mode
(not data communication)
Any parameter or mode changes are executed after the command string is terminated.
Therefore, multiple Q commands in a command string will usually be redundant. that alter the on-hook/off-hook state, since they are executed
The only exceptions are commands as they appear in the command string.
If will reflect the status of the mUltiple Q commands are intertwined with those commands, the responses modem at the time each Q is executed .
• If the modem enters
VOICE
mode with the P
(PICKUP) or V (VOICE) communication session, Q will return a temporary response of the form commands during a data
OCV (carrier detected, in its carrier. This response seems to
VOICE
mode) for as long as the remote modem is responding with contradict the definition of
VOICE
mode, since
VOICE
mode and data communications are designed
88
e,
18
If le ta m to
~d
.0
E le le
]
Low-Level Modem Command Dictionary to be mutually exclusive. No data will be transmitted or received in this state. Since changing to
VOICE mode halts any carrier tone being issued by the modem, and the remote modem will end its carrier when the
HP
827l8A's is lost, the data communication session will end, and the unusual response will revert to the form ONV shortly after it appears.
Responses: see above
R (REDIAL)
R
[dial string]
t'10DOUT
II
~.~p I 9~'~ 1 (:::[1[1) 555-1212
II
:~.:CHP$ ( 1:::::'
Redials the last dialed number. Behaves exactly like the 0 (DIAL) command unless the called phone is busy. Then, instead of hanging up after reporting the BUSY response, the R command automatically redials the
dial string
at intervals of about 40 s until the number is not busy, or until ten dials have been attempted. See the D command for further details and for the syntax of a
dial string.
You can string multiple R commands together (up to 10, as described for the 0 command) to redial up to
100 times.
Responses: 0, 1, 2, 3, 5, B
T (TEST)
I
T
test number
t'10DOUT
II
\T 111 g.:CHP$ ( 1 :::::.
Instructs the modem to perform self -tests. The
test number
is a single digit (0- 2) that specifies one of three different tests. The modem mode and parameters are not affected by any of the different tests, except that the data in the transmit and receive buffers may be lost, and the modem will be on-hook after test 1 is completed,
Test 0 is the hardware integrity test. The modem goes on - hook and executes the power-up self -test. As when the modem is turned on, the modem will report OK if the self -test is successful (the OK reported after a command is executed, not the special OK reported when the modem is turned on). If the test fails, the FAIL response is reported, and the test is repeated. The test will continue to report FAI L and will be repeated until the modem is turned off or the test passes.
Test 1 is the analog loop back test. The modem goes off - hook, connects its analog output to its analog input, and switches the receive circuitry so that it receives and transmits in the same frequency band.
The modem will route all data through its analog circuitry and back to the HP-75 (actually echoed into the receive buffer for t'10D I t'~$ to read) until it receives any low-level modem command.
Test 2 is the local digital loopback test. The modem goes off -hook and retransmits any data that it receives over the phone line. Data from the HP-75 will be ignored. If the modem is in MODEM mode, it tries to establish a data connection by issuing either an answer or an originate tone, depending on whether
89
z
Low-Level Modem Command Dictionary the last mode the modem operated in prior to entering MODEM it cannot establish a connection within about 4 s, CONN LOST mode was ANSWER or ORIGINATE mode. is reported.
If l
\)#
If the modem is in VOICE mode, it will issue a continuous answer the last mode the modem operated in prior to entering VOICE mode was ANSWER or ORIGINATE mode. will issue this tone until you end the test by sending the modem or originate tone, depending on whether any low-level modem command except
It
Q
(QUERY).
You can use test 2 to test the modem in MODEM mode as either the originating or the answering modem.
To exercise another modem, enter VOICE mode before executing tones. test 2 so the modem issues continuous t'10DOUT
II
~'~A ~ H ~ 1",1 ~ T 2
II t:CHP$':: 1 :::) will cause the modem to issue a continuous answer tone, and t'10DOUT
II
~·~O, H, 1",1, T
2
II
:U::HP$':: 1 :::) will cause the modem to issue a continuous originate tone .
• The T command will not perform any modem tests
Deadlock" in Section 2). if the modem is deadlocked (see "Modem
Responses: 8, 9
U
(UN LISTEN)
I u
number of bytes
t'10DOUT II~·~U 111:~.:CHP$( 1:::):~.:11~.~11
Allows sending the command character to the modem as if it were data. After the U command has been for the command character-that is, any executed, the modem will not monitor the transmit data stream modem command. The modem goes back command characters are passed on without invoking a low-level to normal operation after
number of bytes
characters have been transmitted. The
number of bytes
bytes that will not be monitored for the is 1 to 4 hex digits (l-FFFF), specifying 1 to 65,535 consecutive command character.
See also "Sending Command Characters as Data" in Section
2 .
number of bytes
is zero, the modem will never monitor the transmit data
I
t·~
I
T
I
AL
I ZE
I I : t'10Dt'1 stream for the
• If command character. To regain the ability to process low-level either be initialized using
11 modem commands, the modem must or turned off.
Responses: none v
(VOICE)
t'10DOUT II ~.~I",III :~.:CHF.:$ ( 1:::::'
Places the modem in VOICE mode. In VOICE mode, no originate on the telephone line, and the modem does not monitor the or answer tones are placed or looked for line for rings. Any tones or carriers already
90
Low-Level Modem Command Dictionary being issued will be halted. VOICE mode is for voice communication where the modem is used as an auto-dialer only. In VOICE mode, you can dial phone numbers using the X (XMIT) command. If the modem was off-hook, it will remain off-hook.
Responses: none x
(XMIT)
I
X
[dial string]
Dials a number without call progress reporting after dialing. The X command is similar to the D (DIAL) and R (REDIAL) commands in that it dials a
dial string.
However, that is all that X does. Unlike the o and R commands, it only reports three responses: BUSY if the line is busy, CONNECT if there is no busy signal, and NO DIAL if there was no dial tone.
The X command simplifies the use of the modem as an auto-dialer in VOICE mode. If the D command is used for auto-dialing, it will still report all its responses (except BAD ANS and NO ANS), even when they are irrelevant to a voice connection. Using X eliminates almost all phone line monitoring before, during, and after the dialing operation. The only exception is that an implied or explicit P in the
dial string
will check for a dial tone before dialing, and report NO DIAL if there is none.
The X command only works in VOICE mode and if the modem is off -hook. The simplest way to put the modem in VOICE mode and take it off-hook is with the P (PICKUP) command. Consequently, a common command string when using X is P, X followed by the
dial string,
as in the example.
Responses: 3
Z (ZAP)
t'1DDOUT
II
~·~z
II t:CHF.:$
0::
1 :::::0
Clears the modem receive buffer. If the command string contains more than just the Z command, the buffer will be cleared after all the other commands in the string have been executed and their responses have been placed in the receive buffer. Once the buffer has been cleared, the normal response to any completed command (OK or 4) is placed in the receive buffer. Consequently, Z does not leave the buffer completely empty.
Also, the Z command does not clear the HP-7 5 buffer containing data saved by t'10DOUT (see t'1ODOUT).
Any characters saved by t"IODOUT before Z is executed will still be returned by t'10D Ttlt-. Because of this, and because of the appearance of the normal command response, the most effective method for clearing the receive buffer is to use t'10D I t·l$ until it returns a null string .
• The response to the Z command is almost the same response that is reported when the modem is turned on-%OK without a leading or trailing ~R :~r for the long response, or
%4:;1
without a leading
91
Low-Level Modem Command Dictionary
~~ :~f for the short response. Note that the power on response will always have
~ as the command character, but the Z response will have the current command character.
Responses: see above
92
~O_W ~lr;tH,
SERIAL NUMBER
Each HP 82718A carries an individual serial number on the bottom of the unit. We recommend that you keep a separate record of this number. Should your unit be lost, the serial number is often necessary for tracing and recovery, as well as for insurance claims. Hewlett-Packard does not maintain records of individual owners' names and unit serial numbers.
ENVIRONMENTAL LIMITS
Observe the following temperature and humidity limits of the HP 82718A.
• Operating Temperature: 0 to 45 C (32 to 113 F)
• Recharging Temperature: 10 to 40 C (SO to 104 F)
• Storage Temperature: -40to ssC(-40to 131 F)
• Operating and Storage Humidity: 0 to 95% relative humidity
Your HP 82718A should never be operated or stored outside of the specified range. High temperatures are especially damaging to the HP 8271 8A and its batteries. Temperature cycling-from one extreme to another-will cause stresses in your HP 82718A that may also to decrease its reliability. Normal room temperature will give maximum reliability (that is, the smallest likelihood of failure).
OPERA TING PRECAUTIONS
Certain electronic circuits in the HP 82 718A operate continuously, and they are susceptible to disruption or damage at all times. Disruption or damage may be caused by installing or removing the battery packs or the HP-7s while the ac adapter/recharger is connected, by electrostatic discharge to the unit, or by strong magnetic fields. Observe the precautions listed below.
I
CAUTION
I
Hold or touch the HP 82718A while preparing to install the battery packs or the HP-7 s. Touching the insert on the bottom of the HP 82718A is particularly effective for neutralizing an electrostatic charge.
Do not place your fingers, tools, or other foreign objects into the modem's modular jacks or the wand connector or ROM ports on the HP-7 sD.
Turn off the unit before installing or removing the battery packs.
93
Owner's Information
HP 82718A SPECIFICATIONS
General Specifications
Dimensions (including the HP-7 5): 16. 51 cm (6.5 in) x
29.21 cm(11.5in)x
5.72 cm (2.25 in)
Weight (including the HP-7 5): 1. 60 kg (3. 53 lb)
Modem Specifications
Transmission Mode: serial, asynchronous, full duplex
Handshake: XON/XOFF, ENQ/ ACK, none
Transmit Buffer: 8 bytes
Receive Buffer: 64 bytes
Modulation: FSK
Baud Rate: 300
Transmit Frequencies (Hz): 1070, 1270 (originate mode)
2025, 2225 (answer mode)
Receive Frequencies (Hz): 2025, 2225 (originate mode)
1070, 1270 (answer mode)
Da ta Bits: 7 or 8
Start Bits: 1
Stop Bits: 1
Parity: odd, even, always 1, always 0, none
Modes: originate, answer, auto-answer
Modem Compatibility: Bell 103/113
Dialing: automatic or manual, tone or pulse
Tone Dialing:
Tone Duration: 65-75 ms
Intertone Delay: 65 -7 5 ms
Pulse Dialing:
Pulse Rate: 10-11 pu1ses/s
Interdigit Delay: 700- 800 ms
Ringer Equivalence: 0.8 B
Jacks: two RJ 11 C
Electronic Disc Specifications
Memory Size: 32 kbytes (Option 032) or 64 kbytes (Option 064)
94
Owner's Information
Bar Code Specifications
The HP-75D and the bar code software is designed for use with the HP 92267A and HP 92267B Digital
Bar Code Wands. However, you can use any wand that has all of the following:
• Three-pin Hypertronics DO 1 connector
• Operation on a single 5-volt power supply
• Digital output compatible with TTL and CMOS.
• Signal polarity: high on non -reflective, low on reflective
• Less than 50 rna peak current
Switched wands are recommended for use with the HP-7 5D in order to conserve battery life.
The bar code software will reliably decode bar code with these specifications:
• Minimum element width (high resolution wand) of 0.005 in (0. 13 mm)
• Minimum element width (medium resolution wand) of 0.0075 in (0. 19 mm)
• Ratio of wide to narrow elements between 2: 1 and 3: 1
• Minimum scan speed of 3 in/s (7.6 cm/s)
• Maximum scan speed of 30 in/s (76 cm/s)
POWER SUPPLY
INFORM A
TION
Power Consumption
The power consumption of the HP-7 5D and the HP 82718A is shown in the following table:
Operating
Condition
Off
On, id Ie
Running program or STANDBY ON
Accessing electronic disc
Power Supply Modem
Current Adds
120
24
35
45 ua ma ma ma
0
100
100
100 ma ma ma ma
Hand
Adds
0
0
45
0 ma ma ma ma
These numbers represent typical values for power supply current at room temperature (25 C). Your
HP-75D and HP 82 718A may consume more or less, depending on the individual electronic components and the operating temperature.
95
Owner's Information
A fully charged pair of battery packs typically allow more than 10 days of operation using the following duty cycle: HP-75D and HP 82 718A running a program for 1 hr /day, with the wand in use 20% of the time, and the modem in use 5% of the time. Note that this is based on the charge level of the batteries, room temperature (25 C), and the typical operating current requirements shown in the above table.
The HP 82718A battery packs are charged by connecting the HP-75 to the ac adapter/recharger. Turn the HP-7 5 off (press [SH I FT] [ATTN]) before connecting the unit to a power outlet. This will prevent unexpected voltage "spikes" from disturbing the contents of the electronic disc. When the HP-75 is connected to a power outlet, the HP 82718A uses the battery packs only as a backup power supply and normally doesn't draw any power from the batteries.
You won't damage the HP 82718A by using it without one of its two battery packs (see the caution below), but you will only be able to use it for half as long between charges.
I
CAUTION
I
The HP 82718A must have at least one battery pack installed at all times to guarantee proper operation. Be sure to keep a battery pack in the section of the battery compartment that is marked with the warning
PROPER OPERATION REQUIRES BATTERY IN THIS LOCATION.
Low Battery Safeguards
The HP-7 5 has two low-power safeguards to protect the contents of the electronic disc.
After the first indication of low power, either recharge or replace the battery packs as soon as convenient.
• When the battery voltage drops below a predetermined level, the BATT annunciator turns on, signifying from 5 minutes to 2 hours more of operation, depending on the condition of the batteries. This time is based on running a program. If the electronic disc is being accessed, the modem is on, or the wand is being used, the time will be drastically shortened .
• If the voltage continues to drop after this grace period, the HP-75 aborts its normal operations, including any currently executing program, electronic disc access, or modem operation, and turns itself off. However, the battery packs continue to power the electronic disc circuits. If the [ATTN] key or a due appointment causes the HP-75 to turn back on, the HP-75 briefly displays the following message:
WARNING: low batteries
Immediately afterwards, the HP-75 turns off again. At this point, to prevent a complete reset, don't press the [ATTN] key before connecting the unit to an ac outlet or before replacing the battery packs. In this nearly discharged condition, the HP 82 718A will preserve the information on the electronic disc for a few days as long as no one attempts to turn the unit back on.
If the battery pack nears total discharge, the HP-75 will reset itself and lose everything in memory.
Independently, the HP 82 718A will reset itself and lose everything on the electronic disc. Resets may also occur if an attempt is made to turn the unit on (by pressing [ATTN]) or to acknowledge an alarm on low batteries.
96
[l t
. s d
Owner's Information s, g eU,'
1
Battery Recharging
The nickel-cadmium battery packs are being charged whenever the HP-75 is connected to an ac outlet using an ac adapter/recharger. A normal charging time from a fully discharged pair of battery packs to full charge is about 8 hours. Shorter charging periods will reduce the operating time you can expect from a single battery charge. The battery packs are never in danger of becoming overcharged. However, if you recharge the battery packs outside of the recharging temperature range, you may seriously decrease the life of the battery packs .
If you operate the HP-75 from ac voltage continuously for long periods, the nickel-cadmium batteries in the rechargeable battery packs will eventually reach the point at which they will no longer recharge to their full capacity. Consequently, it's advisable every few months to disconnect the ac adapter/recharger and let the rechargeable batteries discharge through normal use of the HP-75 and the HP 8271 8A until the BAn annunciator lights. Then plug in the ac adapter/recharger to recharge the nickel-cadmium batteries to their full potential.
Replacing the Battery Packs
CAUTION
When the HP 8271 8A battery packs are removed, the electronic disc circuits are protected against loss for a minimum of 30 s. You may wish to copy critical files to a mass storage medium before removing the battery packs to avoid the possibility of losing important information if a reset occurs.
Here is how to replace the battery packs:
1) Turn off the HP-75. Press [SHIFT] [ATTN] or type B\'E [RTN].
2) Connect the ac adapter/recharger to the HP-7 5.
3) Turn the HP 82718A upside down and lay it on a flat, smooth surface.
4) Unlatch the HP 82 718A battery door by sliding both ribbed latches away from the edge of the case, and remove the door.
5) Remove each battery pack by pressing down on the edge of the pack nearest the latches, and lifting up on the opposite end.
6) Align the contacts of the replacement battery packs with the correct spring contacts and set them into the battery compartment.
7) Replace the compartment door and secure its two latches.
The nickel-cadmium battery packs use the two parallel contacts in each section of the battery compartment. If the battery packs are inserted backwards, neither the HP-7 5 nor the HP 82 718A will be damaged, although the HP-7 5 and the electronic disc will reset if turned on in this condition.
-,
97
Owner's Information
Rechargeable Battery Care
You will know that the battery packs are recharging if the battery door on the HP 827 1 8A is warm to the touch. After 8 or more hours of recharging, the battery packs should be fully charged. If rechargeable battery packs seem to discharge very quickly, the problem may be that the battery pack has been charged repeatedly at shallow levels due to the low current drain of the HP 8271 8A. In that case, disconnect the unit from its power outlet, type ::::T A t·WB\' ot·~
[RTN] in EDIT mode, and leave the
HP-75 and HP 82718A turned on until the battery voltage drops to the point at which the HP-75 suspends operations and turns itself off (as described in "Low Battery Safeguards"). Then reconnect the unit to a power outlet for at least 10 hours to recharge the battery pack fully.
WARNING
Do not attempt to incinerate or mutilate battery packs-the packs may burst or release toxic materials.
Do not connect together or otherwise short-circuit the battery pack terminals-the packs may melt or cause serious burns.
The battery packs are warranted for 1 year and will be replaced if they don't work properly during the warranty period. Return defective packs to Hewlett-Packard according to the shipping instructions later in this section. (If you are in doubt about the cause of the problem, return the complete HP-75 and
HP 82718A along with the battery packs and the ac adapter/recharger.) If the battery packs are out of warranty, see your nearest dealer to order replacements.
GENERAL CLEANING INFORMATION
The HP 82 718A can be cleaned with a soft cloth dampened either in clean water or in water containing a mild detergent. Don't use an excessively wet cloth or allow water inside the HP 82718A. Avoid abrasive cleaners.
VERIFYING PROPER OPERATION
If you suspect that your HP 82 718A is not operating properly and may require service, troubleshoot your unit this way:
1) Turn the HP-75 off. Press [SHIFT] [ATTN] or type B\'E [RTN].
2) Plug the unit into a power outlet using the ac adapter/recharger.
3) Turn the unit back on by pressing [ATTN]. The display should show a blinking cursor and either the BASIC prompt C» or the text prompt (:). If t'IEt'1 l e d dn
I t. se 1 eet. appears, the
HP 82718A has a hardware failure and requires service.
4) To check the operation of the modem, type: I t··1 I T I AL I ZE
I I : t'10Dt'1 11 I~ t'1ODEt'1 Cti··~ I~ ~'lA I T
10 I~ DI::::;F' t'10DHU [RTN]. Approximately 30 s later, you should see roOK appear in th display. If this operation takes significantly longer than 30 s, the modem has failed its self-test,
98
e r d
.f a re
Ir er rre
T h st,
Owner's Information and the HP 82718A requires service. Pressing [AnN] will halt the execution of the command.
Also, if you see r,F AIL, the modem has failed its self -test, and the HP 82 718A requires service.
5) To check the operation of the electronic disc, type: CAT All II: ::<t'lEt'l
11 [RTN].
(If EF.:F.:OP:
::<t'lEt'l not. ItHTIAlIZEd appears, type ItHTIAlIZE 1I:;:.::t'lEt'l l1 , then reexecute CfiT
Fill II: ;:.::t'lEt'll1.) Press the [~] key until you have seen the catalog information for every file on the electronic disc. Then type t'lA;:':: ;:.::t'lEt'l [RTN] The result displayed should be either :::271:,:::
(HP 82718A Option 032) or 655:::6 (HP S2718A Option 064).
6) If the HP 8271 8A fails to perform a particular operation, such as copying a file from main memory to the electronic disc, or repeatedly displays an error message, such as i rt'.,.'.::t 1 i d f i 1 e::::pE:'C, then carefully reread the information in this manual regarding that operation; you may be specifying the operation improperly.
7) If the display remains blank when [AnN] is pressed, remove the HP-75 from the HP 82718A, and verify the operation of just the HP-7 5 (see the "Verifying Proper Operation" procedure on page 278 of the HP-75 Owner's Manual). If the HP-75 works properly by itself, but not when installed in the HP 827 I 8A, the HP 827 1 SA needs service.
If you cannot determine the cause of difficulty, write or telephone Hewlett-Packard at an address or phone number listed below under service.
LIMITED ONE-YEAR WARRANTY
What We Will Do
The HP 82718A Expansion Pod is warranted by Hewlett-Packard against defects in materials and workmanship affecting electronic and mechanical performance, but not software content, for one year from the date of original purchase. If you sell your unit or give it as a gift, the warranty is transferred to the new owner and remains in effect for the original one-year period. During the warranty period, we will repair or, at our option, replace at no charge a product that proves to be defective, provided you return the product, shipping prepaid, to a Hewlett-Packard service center.
What Is Not Covered
This warranty does not apply if the product has been damaged by accident or misuse or as the result of service or modification by other than an authorized Hewlett-Packard service center.
No other express warranty is given. The repair or replacement of a product is your exclusive remedy.
ANY OTHER IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS IS LIMITED TO THE
ONE-YEAR DURATION OF THIS WRITTEN WARRANTY. Some states, provinces, or countries do not allow limitation on how long an implied warranty lasts, so the above limitation may not apply to you.
IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR CONSEQUENTIAL
DAMAGES. Some states, provinces, or countries do not allow the exclusion or limitation of incidental or consequential damages, so the above limitation or exclusion may not apply to you.
This warranty gives you specific legal rights, and you may also have other rights which vary from state to state, province to province, or country to country.
99
Owner's Information
Warranty for Consumer Transactions In the United Kingdom
This warranty shall not apply to consumer transactions and shall not affect the statutory rights of a consumer. In relation to such transactions, the rights and obligations of Seller and Buyer shall be determined by statu teo
Obligation to Make Changes
Products are sold on the basis of specifications applicable at the time of manufacture. Hewlett-Packard shall have no obligation to modify or update products once sold.
Warranty Information
If you have any questions concerning this warranty, please contact an authorized Hewlett-Packard dealer or a Hewlett-Packard sales and service office. Should you be unable to contact them, please contact
Hewlett-Packard at one of the three locations listed below.
• In the United States:
Hewlett-Packard Company
Personal Computer Group
Customer Communications
11000 Wolfe Road
Cupertino, CA 95014
Toll-Free Number: (800) FOR-HPPC (800367-4772)
• In Europe:
Hewlett-Packard S.A.
1 SO, route du Nant-d'Avril
P. O. Box CH - 121 7 Meyrin 2
Geneva
Switzerland
Telephone: (022) 83 8111
Note: Do
not
send units to this address for repair
• In other countries:
Hewlett - Packard Intercontinental
349 5 Deer Creek Rd.
Palo Alto, CA 94304
U.S.A.
Telephone: (415) 857-1501
Note: Do
not
send units to this address for repair
100
Owner's Information
SERVICE
Hewlett-Packard maintains service centers in most major countries throughout the world. You may have your unit repaired at a Hewlett-Packard service center any time it needs service, whether the unit is under warranty or not. There is a charge for repairs after the one-year warranty period.
Hewlett-Packard products are normally repaired and reshipped within five (5) working days of receipt at any service center. This is an average time and could vary depending on the time of year and the work load at the service center. The total time you are without the unit will depend largely on the shipping time.
Obtaining Repair Service in the United States
The Hewlett-Packard United States Service Center for battery-powered computational products is located in Corvallis, Oregon:
Hewlett-Packard Company
Service Department
P.O. Box 999
Corvallis, Oregon 97339, U. S. A
or
1030 N. E. Circle Blvd.
Corvallis, Oregon 97330, U. S. A
Telephone: (503) 757-2000
Obtaining Repair Service in Europe
Service centers are maintained at the following locations. For countries not listed, contact the dealer where you purchased your unit.
AUSTRIA
HEWLETT-PACKARD Ges.m.b.H.
Kleinrechner-Service
Wagramerstrasse-Lieblgasse
A-1220 Wien (Vienna)
Telephone: (0222) 23 65 11
BELGIUM
HEWLETT-PACKARD BELGIUM SA/NV
Wo luweda 1 100
B-1200 Brussels
Telephone : (02) 762 32 00
DENMARK
HEWLETT-PACKARD A/S
Datavej 52
DK-3460 Birkerod (Copenhagen)
Telephone: (02) 81 66 40
FINLAND
HEWLETT-PACKARD OY
EASTERN EUROPE
Refer to the address for Austria.
FRANCE
HEWLETT-PACKARD FRANCE
101
102
Owner's Information
Revontulentie 7
SF-02100 Espoo 10 (Helsinki)
Telephone: (90) 455 02 11
GERMANY
HEWLETT-PACKARD GmbH
Kleinrechner-Service
Vertriebszentrale
Berner Strasse 117
Post fach 560 140
D-6000 Frankfurt 56
Telephone: (611) 50041
Division Informatique Personnelle
S.A.V. Calculateurs de Poche
F-91947 Les Ulis Cedex
Telephone: (6) 907 78 25
ITALY
HEWLETT-PACKARD ITALIANA S.P.A.
Casella postale 3645 (Milano)
Via G. Di Vittorio, 9
1-20063 Cernusco SuI Naviglio (Milan)
Telephone: (2) 90 36 91
NETHERLANDS
HEWLETT-PACKARD NEDERLAND B.V.
Van Heuven Goedhartlaan 121
NL-1181 KK Amstelveen (Amsterdam)
P.O. Box 667
Telephone: (020) 472021
NORWAY
HEWLETT-PACKARD NORGE A/S
P.O. Box 34
Oesterndalen 18
N-1345 Oesteraas (Oslo)
Telephone: (2) 17 11 80
SPAIN
HEWLETT-PACKARD ESPANOLA S.A.
Calle Jerez 3
E-Madrid 16
Telephone: (1) 458 2600
SWEDEN
HEWLETT-PACKARD SVERIGE AB
Skalholtsgatan 9, Kista
Box 19
S-163 93 Spanga (Stockholm)
Telephone: (08) 750 2000
,
SWITZERLAND
HEWLETT-PACKARD (SCHWEIZ) AG
Kleinrechner-Service
Allmend 2
CH-8967 Widen
Telephone: (057) 31 21 11
UNITED KINGDOM
HEWLETT-PACKARD Ltd.
King Street Lane
GB-Winnersh, Wokingham
Berkshire RG11 5AR
Telephone: (0734) 784 774
International Service Information
Not all Hewlett-Packard service centers offer service for all models of HP products. However, if you bought your product from an authorized Hewlett-Packard dealer, you can be sure that service is available in the country where you bought it.
If you happen to be outside of the country where you bought your unit, you can contact the local
Hewlett-Packard service center to see if service is available for it. If service is unavailable, please ship the unit to the address listed above under "Obtaining Repair Service in the United States." A list of service centers for other countries can be obtained by writing to that address.
All shipping, reimportation arrangements, and customs costs are your responsibility.
.1
.1 p f
Owner's Information
Service Repair Charge
There is a standard repair charge for out -of -warranty repairs. The repair charges include all labor and materials. In the United States, the full charge is subject to the customer's local sales tax. In European countries, the full charge is subject to Value Added Tax (V AT) and similar taxes wherever applicable. All such taxes will appear as separate items on invoiced amounts.
Computer products damaged by accident or misuse are not covered by the fixed repair charges. In these situations, repair charges will be individually determined based on time and materials.
Service Warranty
Any out-of-warranty repairs are warranted against defects in materials and workmanship for a period of
90 days from date of service.
Shipping Instructions
Should your unit require service, return it with the following items:
• A completed Service Card, including a description of the problem.
• A sales receipt or other proof of purchase date if the one-year warranty has not expired.
The product, the Service Card, a brief description of the problem, and (if required) the proof of purchase date should be packaged in adequate protective packaging to prevent in -transit damage. Such damage is not covered by the one-year limited warranty; Hewlett-Packard suggests that you insure the shipment to the service center. The packaged unit should be shipped to the nearest Hewlett-Packard designated collection point or service center. Contact your dealer for assistance. (If you are not in the country where you originally purchased the unit, refer to "International Service Information," above.)
Whether the unit is under warranty or not, it is your responsibility to pay shipping charges for delivery to the Hewlett-Packard service center.
After warranty repairs are completed, the service center returns the unit with postage prepaid. On out-of -warranty repairs in the United States and some other countries, the unit is returned C. O. D.
(covering the shipping costs and the service charge).
Further Information
Service contracts are not available. Circuitry and designs are proprietary to Hewlett-Packard, and service manuals are not available to customers. Should other problems or questions arise regarding repairs, please call your nearest Hewlett-Packard service center .
POTENTIAL FOR RADIO/TELEVISION INTERFERENCE (U.S.A. ONLY)
The HP 82 718A Expansion Pod generates and uses radio frequency energy and, if not installed and used properly-that is, in strict accordance with the instructions in this manual-may cause interference with radio and television reception. It has been tested and found to comply with the limits for a Class B computing device in accordance with the specifications in Subpart J of Part 15 of FCC rules, which are
103
Owner's Information designed to provide reasonable protection against such interference in a residential installation. However, there is no guarantee that interference will not occur in a particular installation. In the unlikely event that your HP 82718A does cause interference to radio or television reception (which can be determined by removing all power to the HP 82718A and then reconnecting the power and turning it on), you are encouraged to try to correct the interference by one or more of the following measures:
• Reorient the receiving antenna.
• Relocate the HP 82718A with respect to the receiver.
• Move the HP 82718A away from the receiver.
• Plug the ac adapter/recharger into a different ac outlet so that the HP 82 718A and the receiver are on different branch circuits.
If necessary, you should consult your dealer or an experienced radio/television technician for additional suggestions. you may find the following booklet, prepared by the Federal Communications Commission, helpful: How to Identify and Resolve Radio-TV Interference Problems. This booklet is available from the u.s.
Government Printing Office, Washington, D.C. 20402, Stock Number 004-000-00345-4.
WHEN YOU NEED HELP
Hewlett-Packard is committed to providing after-sale support of its customers. To this end, our customer support department has established phone numbers that you can call if you have questions about this product.
Product Information. For information about Hewlett-Packard dealers, products, and prices, call the toll-free number below:
(800) FOR-HPPC
(800367-4772)
Technical Assistance. For technical assistance with your product, call the number below:
(503) 754-6666
For either product information or technical assistance, you can also write to:
Hewlett - Packard
Personal Computer Group
Customer Communications
11000 Wolfe Road
Cupertino, CA 95014
104
er al
ACCESSORIES INCLUDED
~W_IT_H __ __
III
Your HP 82718A Expansion Pod comes with each of the following:
• HP 82718A Expansion Pod Reference Manual.
• Two Clips for Carrying Strap.
• Rechargeable Nickel-Cadmium Battery Pack.
• Service Card.
For information about accessories for your HP-7 5, see your nearest Hewlett-Packard dealer. If you are outside the U.S., please contact the Hewlett-Packard Sales Office nearest you. Availability of all accessories, standard or optional, is subject to change without notice .
. er lis he
~
•
105
I
• ' 4
"
,
KEYWORD TAKEOVER AND
__________
III
~~
KEYWORD TAKEOVER BY THE HP 82718A
It is important that the final form of software being distributed is compatible with the intended hardware configuration. One issue related to this is keyword takeover. HP-75 BASIC programs are stored in a compact internal form. If the program includes keywords from plug-in ROMs, the ROM ID of the ROM is used as part of the internal representation of that keyword in the program. If the ROM has been removed when the program is run, the program will not be able to find the ROM and execute the keyword. The program will then halt and display EF.:POP: F.:Ot'1 f'1 i ss i n'~ at the line containing the missing command.
Seven of the keywords in the HP 8271 8A have the same names as keywords in the HP-75 operating system: CI~T, CAT!,* CAT ALL, COP'"!"', I t·~ I T I AL I ZE, PUPGE, and F.:Et·mt'1E. The keywords in the
HP 8271 8A will always override those in the HP-7 5, hence the term keyword takeover.
,
To see the effect of the HP 8271 8A taking over a keyword, look at an example. Type in a program containing the line PUF-::GE "ABC" on an HP-75 installed in an HP 827l8A. Copy the program onto a card, and then copy the card into a stand-alone HP-75. When you run the program in the stand-alone
HP-75, you will get EPF.:OF.:: Pot'1
[01 i ::::~::: i n9. The internal form of the program has the ROM ID of the HP 827l8A PUPGE command, not the PUPGE command of the HP-75. Even though PUPGE
"ABC" does not require the electronic disc, because the program was created using an HP 8271 SA, its
ROMs must be present for the program to run.
A similar situation occurs going the other direction. Type in a program containing the line P UPGE
"ABC: >=:t'1Et'1" on a stand-alone HP-75. (If you were to run this program on the HP-75, you would see
EPPOP: in' . id f i lE'spE'c~ stand-alone HP-75 does not recognize the ::·::t-1Et'1 device code.)
Copy the program onto a card, and then copy the card into an HP-7 5 installed in an HP 827l8A. When you run the program, you will still get EFPOF.:: ..'.::tl i d f i 1 E'spec. The internal form of the program does not have the ROM ID of the HP 827l8A PUF.:GE command, but instead has the HP-75
PUPGE command. Even though PUF.:CiE "AE:C: ::·::t'1Et'1" is meant for the electronic disc, because the program was created without an HP 827l8A, the program will not access the electronic disc.
You can avoid problems of keyword takeover simply by using the TPAt·~::::FOPt'1 command when moving
BASIC programs from one HP-75 configuration to another. First, convert the program into a text file
(TF.:At-~::;FOF.:t'1
"filename"
I HTO TE>::1"). Then copy the text file from the source HP-75 to a mass storage device. Read it into the destination HP-75, and convert the text file into a BASIC program
(TF.:At·~SFOF.:t'1
"filename"
I t·no BI~::; I C).
ABBREVIA TING KEYWORDS
The same idiosyncracies that give problems with keyword takeover will also create difficulties with abbreviated keywords. The HP-7 5 gives you the option of abbreviating keywords when you type them in, such as PU. for PUF.:GE. The HP-75 recognizes abbreviated keywords as the HP-75 version of that
*CAT! in the HP 82718A performs identically as CAT! in the HP-75.
107
Keyword Takeover and Duplicate Keywords keyword only, regardless of any plug-in ROMs. If you type in an HP 827l8A, you will see EF.:F.:OP:
PU. IIABC: ::<t'1EN II on an HP-75 installed i n'.}·:-:t 1 i d f i 1 espec. The PUPGE command that is executed when you type PU. is the HP-75 PUPGE, not the HP 827l8A PUPGE. Since the HP-75 -
&. doesn't recognize the >::t'1Et'1 device code, it rejects the filename.
You can use abbreviations if you really intend to specify the HP-75 version of the command. On the other hand, if you use abbreviations when you actually want the behavior of the ROM version of the command, you will not get that behavior. You will then either have to FETCH each line that was entered using an abbreviated command, and press [RTN] to reenter it without abbreviations, or
TF.:At·j::;FOPt'1 the program into text and then back into BASIC.
SYSTEM CONFIGURATION
The point of all this discussion is to emphasize the following: Make sure that the final, distributed version of your application software is consistent with the hardware configuration in which it will be used. You may be able to develop your software using this final hardware configuration, in which case there should be no problem.
Software developers tend to have other tools G. e., LEX files, ROMs, etc.) resident in their machines to simplify their development work. Before you distribute your software, TF.:At·j::WOPt'1 it into text, and reconfigure your system to match the users' configuration---attach or remove an HP 827l8A, remove unneeded LEX files or ROMs, change key assignments, etc. Then test the program thoroughly to make sure it did not assume the presence of any of the missing hardware or software.
DUPLICA TE KEYWORDS
When two plug-in ROMs have identical keywords, the ROM ID that will be used in a BASIC program depends on the order of the kwywords within each ROM, and the order of the ROMs in the three ROM ports in the HP-7 5. The bar code software in the HP 82 7l8A has six keywords with the same names as the corresponding keywords in the HP 8272 SA Bar Code Reader Module: CD I G I T OF F , CD I G ITO t·j,
CD","11, CD'.,.':::9, CODE 11 $, and CODE:::9$. Consequently, if you develop a program using both the
HP 8271 8A and the Bar Code Reader Module, your program may not run properly when one or the other is not plugged in to the HP-75. Either create your programs with the final hardware configuration you expect to use (HP 827l8A attached or not, Bar Code Reader Module in or not), or TF.:At·j::WOF.:t'1 your program into text, configure your system in its final form, and TPAt·j::;F OF.:t'1 your program back into
BASIC, as described previously.
108
•
~HP
ALPHABETICAL ERROR LISTING
R_ES_P_O_N_S_E_S~lri~H,
This appendix lists all the BASIC errors reported by the high -level modem, electronic disc, and bar code commands, and all the responses reported by the low-level modem commands.
Message
MEMIC didn't select.
MM generic error message . modem abort . . . modem bad . . . . • modem cold start modem off . . . . . nested too deep.
XMEM INITIALIZEd .
XMEM not INITIALIZEd
Error
Number
. 211
151
152
. 153
150
213
214
212
NUMERICAL ERROR LISTING AND DESCRIPTIONS
Error
Number
150
Message and Condition
CAF.:F.: I EF.:?, FF.:At'1E?, HOOK?, t'10D I t'~$, t'10DOUT, PAF.: IT',!,? t'1DDEt'1 Ot·~ must be performed before this command can be executed.
I 152
153
CAF.:F.: I EF.:?, FF.:At'1E?, HOOK?, ItH T I AL I ZE ": t'10DW' , t'1ODEt'1 OFF,
MODEM ON, MODINS, MODOUT, PARITY?
The modem operation was aborted because the [ATTN] key was pressed or because of low batteries in the HP-75,
PlodePl b.::td t'10DEt'1 Ot·~
The modem cannot be turned on, and requires service.
109
110
212
213
214
HP 8271 8A Errors and Responses
CAF.:P I EP?, F F.: A t'1 E ?, HOOK?, t'10D I t·~$, t'10DOUT, PAF.: IT'"!"'?
The modem has reset itself to its default state, probably because of insufficient battery power in the HP 82718A.
•
COP'r', PP Hn #
There may be a RAM hardware failure. The electronic disc should be in it ialized (ItH T I AL I ZE ": ::.::t'1Et'1II ) ,
::·a'1Et'1 not. HU T I AL I ZEd
W::::::I Gt·~ #, CAT, COP'"!"', CPEATE DIP, D I F.: I:::, t'Hi::·:: ::·::t'1Et'1, PE:::TOPE
#, ::·::CAT:t, ::<D I F.::t, ::·::t'1Et'1
ItHTIALIZE ": ::·:;r'1Et'1" must be executed before this operation can be performed. nesh:.;od t.
00 deep
COP'"!', CPEATE DIP, PEt·~m1E
The maximum number of directory levels is 7 (0-6).
XMEM INITIALIZEd
The electronic disc has reset itself to its default state, and all information in it has been lost.
MEMIC didn't select. ltHTIALIZE 1:::·::t'1H1" and when the HP-75 is turned on
If this message appears, there is a hardware problem with the
HP 82718A, and it requires service.
HP S 2 71 SA Errors and Responses
•
ALPHABETICAL RESPONSE LISTING
Long Short
Response Response
ABORT
BAD ANS
BUSY
CONNECT
CONN LOST
FAIL
NO ANS
NO DIAL
OK
OV
RING
RING IN
8
9
2
3
4
OV
5
7
A
B a
1
NUMERICAL RESPONSE LISTING AND DESCRIPTIONS
Short
Response a
Long Response and Condition
BUSY (BUSY followed by a space)
D (DIAL), M (MODEM), 0 (ORIGINATE), R (REDIAL)
The modem has detected a busy signal.
CONNECT
A (ANSWER), D (DIAL), M (MODEM), 0 (ORIGINATE), R (REDIAL)
.,
2
• D, R: In MODEM mode, the modem has detected an answer tone; in VOICE mode, the modem has detected anything other than a busy signal.
• M: A valid data connection exists.
• 0: The modem has detected an answer tone.
NO ANS
A (ANSWER), D (DIAL), M (MODEM), 0 (ORIGINATE), R (REDIAL)
• A: The modem did not detect an originate tone.
• D, R: In MODEM mode only, the modem detected either no dial tone or an unsteady tone after dialing, or there was no answer after either
111
8
HP 8271 SA Errors and Responses
the maximum number of rings (ring count
+
4, up to a limit of nine) or 50 s elapse after the dialing operation ends.
• M, 0: The modem detected either no dial tone or an unsteady tone
the maximum number after dialing, or there was no answer after either of rings (ring count
+ 4, up to a limit of nine) or 50 s elapsed
after the dialing operation ended.
~ ~
','
3
4
5
7
NO DIAL
D (DIAL), M (MODEM), R (REDIAL), X (XMIT)
The modem did not detect a dial tone.
OK
(all commands and spontaneous responses)
The modem executed or aborted a command string,
for a spontaneous response. or completed the action
RING
D (DIAL), 0 (ORIGINATE), R (REDIAL)
• D, R:
In MODEM mode on ly, the modem detected a ring remote modem. back from a
• 0: The modem detected a ring back from a remote modem.
RING IN
Spontaneous response
The modem detected an incoming ring.
•
9
CONN LOST
Spontaneous response and T (TEST)
The carrier from the remote modem has disappeared.
• T 2: There is no data communication established.
FAIL
Power up and T (TEST)
The modem has failed its self-test.
, •
112
HP 8271 8A Errors and Responses
• if
•
A
B
OV
ABORT
Spontaneous response
The modem has aborted a command string without executing it because of an error or because i t contained a
.a$
(backspace-ASCII 8 or control-H) or ~A~ (cancel-ASCII 24 or control-X).
BAD ANS
A (ANSWER), D (DIAL), M (MODEM), 0 (ORIGINATE), R (REDIAL)
• A: In MODEM mode only, the modem detected a tone not in the origina te band.
• 0, R: In MODEM mode only, the modem detected either a tone not in the answer band or a dial tone after dialing.
• M, 0: The modem detected either a tone not in the answer band or a dial tone after dialing.
OV
Spontaneous response
The modem receive buffer has overflowed.
EXACT SEQUENCE OF RESPONSE CHARACTERS
Below are listed the exact sequence of characters reported by the modem when the different responses occur. The following symbols are used: ~t1 (command character), ~R (carriage return), ,~f' (line feed), and 11111
(space). The spaces between symbols areio improve readability-=any spaces reported in the response are shown with m'.
ABORT
After all commands except T 3 through T F:
Long: \
Short: \
CR tt: CM A BORT cRtf'". (j~
OK p~ i~t fRbf f~
A f~ :bf fM
4
After T 3:
Long:
Short:
CRLF CM ABORT CR IF OM OK tR'f:
GRLF CM A CR IF CM 4
After T 4 through T F:
113
114
HP 8271 8A Errors and Responses
Long: ?\ CR .LF CM ABORT
CR~f g~
OK
¢~ :~~
Short: ? \
QR
.~f
Qt1
A gR~f'
gM
4
BAD ANS
Long:
~R
Short:
C~ tF
CM
BADANS
CR~F
V' eM B tR .~f' eM 4
CM
OK t~ .~f'
BUSY
Single dialing operation or the last dial of a repeated dialing operation (either redialing or multiple dialing commands in the command string):
Long:
~R~r C~
BUSY!!!
~R '~f ~~
OK
~R !~~
Short:
CR V' GM
0
CR
:~f eM 4
All but the last dial of a multiple dialing operation:
Long: CR Lf CM
Short:
~R
lQI=' OM
BUS
0
V:::::
.....
CONNECT
Long: ..
~.~~FtM
CONN ECT ..
~~ :~i p~
OK
Short:
~R~f Q~
1
~B .~E ~~
4
PR
!~f'
CONN LOST
Long:
~~ I~r- ~~
CONN: LOST
~~ [~r-
Short:
CR
.~f
eM
8
tR
[~!='
PM
4
CM
OK
GR~!=,
rAIL
Long:
P~~F P~
F AI L
Short:
PR
:bf CM 9
tR [br
NO
ANS
Long:
Short:
PR tF eM NOANS
~R !~f ~f:4
OK
CR~f'
CR ..
bf C.M 2
~R l~,t i~,M
4
NO DIAL
Long:
Short:
CR IF CM NO DIAL CR !~f'
CR .LF eM 3 GRbf eM 4
tM
OK t~
'bE
, •
HP 8271 8A Errors and Responses
I
• OK
After commands are echoed:
Long:~R·~t ~~
OK
~R
Short: QR ,~f ~M 4
,Lit
When the modem is turned on (this response will be read with a single t'10D HU):
Long: ';OK
Short: ';4m
After the Z (ZAP) command (this response will be read with a single t'10D H~$):
Long:
Short: eM
OK
CM 4,:
OV
Long:
~~
OV
Short: eM
OV
• f
RING
Long:
CR
:~f
Short:
¢R~t
eM
OM
RING
5
RING
IN
Long:~R:Pr
..
~.~
R
I~G:
IN ..
~~ !~:~
Short: QR~F QM 7 ~,R ,~F ~M 4 eM
OK c~ ,~~
Q (QUERY)
Long: c$~f ~~
query response
~.~ ·~r ~~ tF ~M
OK
~R~t
Short:
9,B, ,~t 9,~
query response
~B,~,t ~B, ,HG
gM
4
For details on the specific characters returned by the
Q command, see the "Low-Level Modem
Command Dictionary" or "Decoding the Query Response" in Section 2.
Command String Echoing
Command strings are echoed in exactly the same form as they were sent to the modem. The ended the command string will always be echoed as a ~R
PR,
that
Lt even if command echoing is disabled (E 1).
For commands that expect a parameter, the terminating ~B will not be echoed if it is received before the parameter-instead, the command string will be aborted. Neither PA~ nor '~~ are echoed when they cause a command string to be aborted.
115
116
HP 8271 SA Errors and Responses
Dial String Echoing
If command echoing is enabled (E 0), the modem will echo the dial string when it receives the command string containing it. The dial string will be echoed in exactly the same form as it appeared in the command string. The modem will echo the dial string again each time it is dialed by any of the three dialing commands: 0 (DIAL), R (REDIAL), or X (XMIT). The 0 and X commands echo the string once
(unless they are repeated in the command string--see the 0 command in the "Low-Level Modem
Command Dictionary"). The R command echoes the dial string up to 10 times as it redials.
The dial string echoed during dialing will be in a different form than in the command string. Characters that are ignored in the dial string are not echoed. The special characters P and W will not be echoed, but will break the dial string into segments separated by spaces. Echoing will stop for the duration of the waits imposed by those characters. The special character I will not be echoed, but will cause all digits between the I and the next P or W (or the end of the dial string) to be echoed. The digits # and
*
will be echoed as ; and <. There will be a trailing space but no carriage return or line feed after the entire dial string has been echoed.
• t •
\ t
"-----K_EY_W_O_RD_A_N_D _C_O_M_M_A_N_D_S_U_M_M_A_R_Y
------I1~i~M'
'"
HIGH-LEVEL MODEM KEYWORDS
Keyword
A\,'AIL?
CAPF.: I EF.:?
FF.:At'1E?
HOOK?
ItHTIALIZE
II : t'10 Dt'1II
Page
62
62
68
68
69
Description
Checks if data is available from the modem
Checks if there is a carrier
Checks if framing error from last t'10D n~$
Checks if modem is on - hook
Resets the modem to its default state
• t'10DEto1 OFF t'10DEt'1 Ot·~
, t'10D I t'~$ 71 Reads data from the modem t'10DOUT
70
71
72
Turns modem off
Turns modem on
Sends a string to the modem
PAF.: I T''('? 72 Checks if parity error from last t'10D I t'~$
F.:EAD'r'? 74 Checks if modem is ready for data t ,
117
118
Keyword and Command Summary
LOW-LEVEL MODEM KEYWORDS
Command
A (ANSWER)
B (BREAK)
C (COUNT)
0 (DIAL)
E (ECHO)
F (FORMAT)
G (GIVEBACK)
H (HANGUP)
I (INITIALIZE)
K (KONTROL)
L (LONG)
M (MODEM)
N (NEW)
0 (ORIGINATE)
P (PICKUP)
Q (QUERY)
R (REDIAL)
T (TEST)
U (UN LISTEN)
V (VOICE)
X (XMIT)
Z (ZAP)
90
91
91
Page
79
79 gO
84
86
86
87
80
82
82
83
83
83
87
88
88
89
89
90
Description
Places the modem in ANSWER mode
Sends a break
Sets the ring count
Dials a sequence of numbers
Enables and disables command echoing
Sets data format (parity) and data length
Enables and disables data echoing
Hangs up modem
Resets the modem to its default state
Sets serial handshake protocol
Specifies long or short echoing of modem responses
Places the modem in MODEM mode
Specifies new command character
Places the modem in ORIGINATE mode
Takes modem off-hook and places it in VOICE mode
Asks the modem for status information
Redials last dialed number
Performs modem self -tests
•.
\
•
•
•
Allows sending command character to modem as if it were data
Places the modem in VOICE mode
Dials a number without call progress reporting after dialing
Clears modem receive buffer
,.
Keyword and Command Summary
~ J
ELECTRONIC DISC KEYWORDS
Keyword
A~:;S I Gt·~ #
CAT
COP\'
CF.:EI1TE D I F.:
I tH T I FIL I ZE
II :
::.::t'1Et'1" t'1A::-:: ::<t'l E t"
PF.:HH #
PUPGE
PUPGE D I F.:
F.:EAD #
F.: E t'1 0 '",' E
F.: E t·~ At" E
F.:ESTOF.:E #
::<CAT$
::·::DIP$
>:: t'1 E t'1
74
74
76
76
72
73
73
67
68
70
70
77
77
77
Page
61
62
67
Description
Associates file number with specified file on electronic disc and opens the file
Catalogs files and directories on electronic disc
Copies files within electronic disc and between the disc, the
HP-75, and HP-IL mass storage devices
Creates a new directory on electronic disc
Changes the current directory
Resets the electronic disc to its default state
Returns total amount of memory on electronic disc
Writes data to electronic disc file
Deletes file from electronic disc
Deletes directory and child files from electronic disc
Reads data from electronic disc file
Asks user before purging files
Changes name and/or location of file on electronic disc
Sets specified file pointer to indicated line number
Returns catalog of files on electronic disc
Returns catalog of current directory on electronic disc
Returns amount of available memory on electronic disc
119
I
Keyword and Command Summary
BAR CODE KEYWORDS
Keyword
CDIGIT OFF
CDIGIT ot·~
CD'",' 11
C:
[1 11
/ :::
13
CODE11$
CODE:::9$
Page
64
64
65
65
65
66
Description
Turns off automatic check digit verification by the decoders
Turns on automatic check digit verification by the decoders
Verifies the check digit for Code 11 labels entered from the keyboard
Verifies the check digit for Code 39 labels entered from the keyboard
Scans a single Code 11 label
Scans a single Code 39 label r
~
•
•
120
he
'S he
rs
--. t.'
1:
2:
3:
4:
Introduction (page 7)
Software Usage and Examples (page 15)
Keyword Dictionary (page 61)
Low-Level Modem Command Dictionary (page 79)
•
European Headquarters
150, Route du Nant·O' Avril
P.O. Box, CH-1217 Meyrin 2
Geneva-Switzerland
82718-90001 English
FliP'W
HEWLETT
Portable Computer Division
1000 N.E. Circle Blvd., Corvallis, OR 97330, U.S.A.
HP-United Kingdom
(Pinewood)
GB-Nine Mile Ride, Wokinham
Berkshire RG 11 3ll
Printed in U.S.A. 7/84
تنزيل
إعلان