The Absolute Direction Instruction, Di; The Relative Direction Instruction, Dr - HP 7470A Interfacing And Programming Manual

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

Advertisement

The Absolute Direction Instruction, D I
)
' )
)
: )
)
■ )
, )
• )
> )
)
• )
< )
o
• >
V
)
, )
' )
V )
1
)
( )
i )
)
: )
I'lyiliimiLLlJ
The absolute direction instruction, DI, specifies the
direction in which characters are lettered.
lUasa The instruction can be used to change the direction of labeling
to a new absolute direction; by absolute we mean independent of Pl,P2
settings. It is especially useful for labeling a Y-axis or labeling a
vertical graph.
DI
run, rise
terminator
DI
or
terminator
■TflJHiufilll'llI
Run and rise are in decimal format, 0 to ±127.9999,
and specify the direction according to the relationship:
where:
rise = SIN (9)
run = COS («)
At least one parameter must be effectively nonzero, i.e., | > 0.00041.
A DI command with a rise parameter of zero will produce horizontal
labeling. A DI command with a run parameter of zero will produce
vertical labeling.
A DI command with no parameters will default to the values DI 1,0
(horizontal). A DI command with only one or more than two parameters
will set an error condition and the instruction will be ignored.
A change in the orientation of P i and P2 will not affect the direction of
labeling. A DI command remains in effect until another DI, DR, IN, or
DF command is executed, or the plotter is initialized from the front
panel.
A DI command updates the carriage-return point to the current pen
position.
When the angle, 6, necessary to establish the desired label direction is
known, the command DI cos0, sinfl can be used to establish label
direction.
10 LABELING
The following example labels the years 1978 through 1985, in a circular
pattern starting with vertical labeling. The direction in which each
year is labeled is changed by 45 degrees. Then the labels in the center
are drawn to illustrate the use of cosine and sine values as parameters.
The label _*_2000 contains both a carriage return and a line feed
character before the label terminator, ETX, so the pen position at the
end of that label is one line below the beginning of that label. The fact
that DI commands update the carriage return point can be clearly seen
by observing the pen's position at the end of the program. The final
character in the last label is a carriage return and the pen returns to
the carriage return point, the position of the pen at the last DI
command.
" I N ; S P 2 , P P > 1 0 5 0 , 4 4 5 0 ; "
"DIO, 1 ;LB_*_19?8«k
D I 1 , 1
" D I 1 , 0 ; L B _ * _ 1 9 6 0 ^ D I 1 , -
"DIO, -1 ;LB * 1982
1
* D I - 1
" D I - 1 , 0 ; L E T " * 1984^. D I - 1
" P R 1 5 0 0 , 5 3 5 0 ; D I " , C 0 S ( O )
" D I " , C 0 S l - 4 5 ) ; S i N C - 4 5 ) ;
FINAL PEN POSITION =
CARRIAGE RETURN POINT
; L B _ * _ 1 9 ? 9 V
1 ; L B _ * _ 1 3 8 1 V
, - 1 ; L B _ * _ 1 9 8 3 V
, 1 ; L B _ * _ 1 9 8 5 V
, SI N ( 0 ) ; " LB_*_2000
f
«
l
T V
" L B
RETURN P O I N T S ^ "
O_*-J980
s
NOTE: Check the format of the COS and SIN functions on your
computer, and change these accordingly. Also, check your computer
documentation to see how your computer interprets angles. If angles
are interpreted as radians, you need to change to degrees before using
the COS and SIN functions. On the HP Series 80 computers, execute
the BASIC statement DEG. ■
The Relative Direction Instruction, DR
IHWHMIJIIHL'I The relative direction instruction, DR, specifies the direc­
tion in which characters are lettered.
LABELING
5-11

Advertisement

Table of Contents
loading

Table of Contents