The 7470 Plotter's Instruction Set; Hp-Gl Syntax - HP 7470A Interfacing And Programming Manual

Graphic plotter
Hide thumbs Also See for HP 7470A:
Table of Contents

Advertisement

)
i
The 7470 Plotter's Instruction Set
All three interface configurations for the H P 7470 Plotter use the s a m e
Hewlett-Packard G r a p h i c s L a n g u a g e (HP-GL) i n s t r u c t i o n set, w i t h
minor exceptions.* HP-GL consists of two-letter m n e m o n i c instructions
which activate the plotter. A table listing the instructions alphabetically
is located a t the end of the n e x t section. S y n t a x descriptions a n d
e x p l a n a t i o n s of these instructions are contained in C h a p t e r s 1 t h r o u g h
8. Six additional HP-GL instructions cause no operation but are in­
cluded for compatibility with other H P plotters. These instructions are
listed in Appendix C.
Fourteen additional instructions, called device control instructions, are
required by t h e RS-232-C configuration. These instructions are used to
establish plotter output a n d h a n d s h a k e protocol, a n d to control condi­
tions w h i c h are pertinent only to the RS-232-C e n v i r o n m e n t . In a n
RS-232-C plotter, all HP-GL instructions enter the plotter's internal
buffer a n d a r e executed in a first-in, first-out sequence. Device control
instructions do n o t enter t h e buffer, b u t instead are executed imme­
diately upon receipt. Refer to C h a p t e r 10 for the s y n t a x description a n d
an e x p l a n a t i o n of the device control instructions.
HP-GL Syntax
An H P - G L instruction is a two-letter mnemonic, which m a y be upper-
or lowercase. A c o m m a n d is defined a s a n instruction followed by its
p a r a m e t e r field, if any, a n d a terminator. If p a r a m e t e r s follow the
mnemonic, they m u s t be s e p a r a t e d from each other by a t least one
c o m m a or space, or by a + or — sign which m a y be preceded by c o m m a s
or spaces. Optional c o m m a s a n d / o r spaces m a y be used a s s e p a r a t o r s
before, after, a n d between the m n e m o n i c a n d before the t e r m i n a t o r . An
instruction is terminated by a semicolon, nonalphabetic a n d nonnu-
meric c h a r a c t e r s such a s # or $, or by the next mnemonic. If you h a v e
an HP-IB or HP-IL plotter, a line feed c a n also terminate a n instruction.
(Note t h a t if you h a v e a n RS-232-C plotter, a line feed is n o t a valid
t e r m i n a t o r . ) Some i n s t r u c t i o n s will execute i m m e d i a t e l y after t h e
m n e m o n i c or last required p a r a m e t e r is received. When t h i s is t h e case,
the d e s i g n a t i o n for the t e r m i n a t o r is shown in p a r e n t h e s e s in the
s y n t a x description. The s y n t a x is shown on the next page.
*Option 001 provides 45 instructions; Option 002 provides 42 instructions;
Option 003 provides 41 instructions. Refer to the Plotter Instruction Set table
in this chapter.
1-6 GETTING STARTED
Mann
«itei
^^tmm^timtmit^tmimi^iiiitmm
INSTRUCTION
PARAMETER FIELD
MNEMONIC
(AS REQUIRED)
(AS REQUIRED)
J-^L
I
_ J
Sep X Sep X Sep P a r a m e t e r Sep P a r a m e t e r Sep T e r m i n a t o r
OPTIONAL SEPARATORS
^ ^ REQUIRED SEPARATOR
(0OR MORE COMMAS
AND/OR SPACES)
NOTE: T h e s y n t a x implemented on t h e 7470 is extremely flexible a n d
differs from t h a t used on other Hewlett-Packard plotters s u c h a s t h e
H P 9872. Therefore, a n y software written for t h e 7470 w h i c h takes ad­
v a n t a g e of its less rigorous s y n t a x will n o t be able to d r i v e most o t h e r
H P plotters. If software is to be used w i t h other H P - G L plotters, t h e
more rigorous s y n t a x of the H P 9872 plotter should be used.
XX P a r a m e t e r s (.Parameters) Terminator
INSTRUCTION
'
FOR RS-232-C PLOTTERS
;OR LF FOR HP-IB OR
HP-IL PLOTTERS
OPTIONAL PARAMETERS
T h e 9872 s y n t a x does not allow s e p a r a t o r s between t h e c h a r a c t e r s of
t h e m n e m o n i c . One c o m m a m u s t s e p a r a t e p a r a m e t e r s . O n l y ; or L F
m a y be used a s the t e r m i n a t o r for HP-IB or HP-IL plotters, a n d only ;
m a y be used a s t h e t e r m i n a t o r for RS-232-C plotters. I n addition, pa­
r a m e t e r s r e q u i r i n g integer f o r m a t m a y n o t c o n t a i n a decimal point or
decimal fraction. ■
Some i n s t r u c t i o n s h a v e optional p a r a m e t e r s which, w h e n omitted,
a s s u m e a default value. In order to omit a p a r a m e t e r , all s u b s e q u e n t
p a r a m e t e r s in the s a m e instruction m u s t be omitted. T h e only excep­
tion is t h e pen p a r a m e t e r s in the HP-GL instruction, U C .
T h e label instruction, LB, is a special case; it m u s t be t e r m i n a t e d w i t h
the label t e r m i n a t o r character. T h i s c h a r a c t e r defaults to the A S C I I
end-of-text character, ETX, whose decimal equivalent is 3. T h e label
t e r m i n a t o r m a y be c h a n g e d from its default value u s i n g the define
t e r m i n a t o r instruction, DT.
T h e p a r a m e t e r fields m u s t be specified in the format defined by t h e
s y n t a x of e a c h respective HP-GL instruction. T h e f o r m a t c a n be of
three types:
1. Integer F o r m a t — a parameter in integer format between —32 768.0000
a n d +32 767.9999. Decimal fractions of p a r a m e t e r s w h i c h m u s t b e
integers are truncated. If no sign is specified, t h e p a r a m e t e r is
a s s u m e d to be positive.
GETTING STARTED
1-7

Advertisement

Table of Contents
loading

Table of Contents