HP 7470A Interfacing And Programming Manual page 55

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

Advertisement

)
)
)
)
. )
)
)
' )
)
)
■ •
)
o
)
( )
' >
' )
( )
: )
' )
<'..)
O
O
. )
O
i )
o
< )
o
o
EXPLANATION
The AR instruction requires t h a t both X- and Y-
increment parameters (coordinate pair) and arc angle be specified.
Increment parameters are in integer format and are interpreted as
plotter units if scaling is off or user units if scaling is on. The X- and
Y-increment parameters locate the center of the arc with respect to the
present pen position. The signs of the increment parameters determine
the relative location of the center of the arc. A positive value locates
that center in a positive direction and a negative value locates that
center in a negative direction. The current pen position is the starting
point of the arc.
The arc center can be located on or off the plotting surface. The arc
angle is in integer format. It is the angle, in degrees, through which the
arc is drawn; a positive arc angle draws CCW; a negative arc angle
draws CW.
The chord angle parameter is in integer format and governs the
smoothness of the arc in the same way as defined under the circle
instruction, CI. The sign of the parameter is ignored, except to set the
maximum in-range limit to —32 768 or +32 767. The default chord angle
is 5 degrees.
Unlike circles, arcs are drawn using the previously commanded pen
state (up or down) and line type. If no pen state has been commanded
since initialization, pen up is assumed. If no line type has been
commanded, a solid line is drawn.
Arcs are drawn within the defined window, with clipping occurring
outside the window limits. Drawing arcs within the window conforms
to the definitions given for plotting under the PA instruction.
All parameters must be integers in the range -32768 to 32 767. Specify­
ing out-of-range parameters sets error 3 and the command is ignored.
The following BASIC programs demonstrate the use of the AR
instruction.
10
PRINTER I S
10
20
PRINT
" I N ; S P 1 ; I P 2 6 5 0 , 1 3 2 5 , 7 6 5 0 , 6 3 2 5 ; "
30
PRINT
" S C - 1 0 0 , 1 0 0 , - 1 0 0 , 1 0 0 ; "
40
PRINT
" P f i - 8 0 , - 5 0 ; P D ; f l R 0 , 8 0 , 9 0 ; H R 8 0 , 0 , 9 0 ; P U ; "
50
END
Line 10 defines the select code of the interface; change this statement
as necessary for your computer.
Line 20 enters the PI and P2 points on which to scale the plotting area.
Line 30 scales the plotting area into user units.
^-20 CONTROLLING THE PEN AND PLOTTING
Line 40 moves the pen to the point -80,-50, draws a 90-degree CCW arc
centered 0,80 units relative to the present pen position, then draws a
90-degree arc centered 80,0 units relative to the 0,30 absolute pen posi­
tion. Note that a pen down command, PD, is required to draw the arc.
(0,30)
(-80,30)
E-H3
(-80,-50)
START
—| (80,30)
(80,-50)
E-a
10 PRINTER IS 10
20 PRINT "IN;SP1;IP2650,1325,7650,6325;"
30 PRINT "SC-100,100,-100,100;"
40 PRINT "PB-100,40;PD;PR60,0;flR0, -40, -90;RR40,0,90;PR60,0;PU;"
50 END
In this example, line 40 moves the pen to the point —100,40, lowers the
pen, and plots 60,0 units relative to the previous pen position, -100,40.
It then draws a 90-degree CW arc centered at 0,-40 units relative to the
new -40,40 pen position, and follows it with a 90-degree CCW arc
centered 40,0 units relative to the 0,0 pen position, the endpoint of the
first arc. Finally, it plots 60,0 units relative to the pen position 40,-40,
the endpoint of the second arc.
(-100,40)
(-40,40)
E<!3
(100.-40)
(40,-*0)
CONTROLLING THE PEN AND PLOTTING 3-21

Advertisement

Table of Contents
loading

Table of Contents