The Scale Instruction, Sc - HP 7470A Interfacing And Programming Manual

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

Advertisement

)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)
The Output Win
)
|»|yitJHiaHllll
The o
s
means to obtain the X
right corners of the are!
)
I ' H y j
The instructio)
any plotting will occur
1
the execution of a DF
determine under progri
or A4.
EMEU OW (termi
MJWiwaii'Hi No
Pai
After an OW commam
nates of opposite corni
integers in ASCII in thi
Xlower left, Yloj
where [TERM] is the ol
Should Understand in \
The range of the intej
switch as shown below;
US
OsSXsSK
0«S Y«S7t
If Xlower left is greater
Yupper right, no window {
2-10 ESTABLISHING BOUNDA
«'
)
)
O)
tpii
o
J
vVr)
i d
)
£0l^
trle\
pu^
)
)
JlA.
1
'
ist)
■ ■
)
)
.. )
i )
(
)
The instruction can be used to determine the position of P i
and P2 in plotter units. This information can be used with the input
window command, IW, to set the window to PI and P2 under program
control, to compute the number of plotter units per user unit when
scaling is on, or to determine the numeric coordinates of P i and P2
when they have been set manually.
E f f i E E ]
OP
(terminator)
EXPLANATION
After an OP command is received, the plotter will out­
put the coordinates of PI and P2 in plotter units as four integers in
ASCII in the following form:
Plx,Ply,P2x,P2
y
[TERM]
where [TERM] is the output terminator for your system. See Terms You
Should Understand in Chapter 7.
The range of the integers is determined by the setting of the paper
switch as shown below:
<
)
o
US
0sSXsS10 300
0 < Y < 7 6 5 0
A4
0 ^ X ^ 1 0 900
0«S YSS7650
Upon completion of output, bit position 1 of the output status byte is
cleared.
x'he Scale Instruction, SC
DESCRIPTION
The scale instruction, SC, establishes a user-unit coordi­
nate system by mapping values onto the scaling points P I and P2.
This instruction is used to enable you to plot in user units con­
venient to your application. For instance, if your X values represent
months, then X
m
i
n
= 1 and Xmax = 12. If the values for Y-coordinates
all lay between 0 and 10, you might use 0 as Y
m
in and 10
By
adjusting your minimum and maximum values, you can provide addi­
tional room for labeling. If your plot is a 12-month bar chart with Y-
coordinates 0 to 10, you might scale the X-axis 0 to 14 so the first and
last bars are not at the edge of the graph, and scale the Y-axis 0 to 12
leaving room for a title at the top.
BEECH
SC
Xmin,Xmax,Yrnin,Ymax (terminator)
or
(terminator)
SC
^ • 6 ESTABLISHING BOUNDARIES AND UNITS
S3
mm
Executing an SC command without parameters (SC;)
turns scaling off and subsequent parameters of plot commands are in­
terpreted as plotter units.
When parameters are used, all four parameters are required. Decimal
parameters in an SC command are truncated to integers. The param­
eters Xmin and Ymin define the user-unit coordinates of P I , and the
parameters X
m
ax and Ymax define the user-unit coordinates of P2. P I
and P2 may be any two opposite corners of a rectangle. Scaling points
PI and P2 retain the assigned user-unit coordinate values until scaling
is turned off or another SC command redefines their user-unit coor­
dinate values. Therefore, the physical size of a user unit will change
when any change is made in the relative position and distance between
PI and P2.
Specifying X
m a
x = Xmin or Y
m a
x= Ymin or parameters less than—32 768
or greater than 32 767 will turn scaling off. An SC command must have
four or no parameters. Otherwise, error 2 will be generated. An SC
command which generates a n error is ignored a n d the scaling does not
change.
The user-unit coordinate system that is mapped onto the plotter unit
coordinate system by the SC command is not limited to the rectangle
defined by P i and P2; it extends over the entire plotting area. When
user-unit scaling has been established by executing an SC command
with parameters, decimal parameters of plot commands are not trun­
cated; the point 3.5,7.5 is distinct from the point 3.6,7.8. This is
different from some other HP plotters and makes plotting of noninteger
data much simpler.
It is not possible to scale an area such that PI or P2 are assigned
values larger than 32 767 or less than -32 768. One way to plot data
with values beyond these limits is to reduce your data to acceptable
ranges by an arithmetic process before sending it to the plotter. Divid­
ing the data by some factor of 10 so that the integer portions fall
between ±32 767 and sending decimal plot parameters is probably the
easiest solution.
The illustrations which follow show the coordinate grids mapped onto
the plotting area as a result of executing the indicated commands when
the paper switch is set to us. In all cases, the points labeled at each
corner are just outside of the plotting area. If a PA command with these
parameters is sent to a plotter with the indicated scaling and the paper
switch set to us, the pen will move to the corner and lift, indicating the
point is outside the plotting area.
ESTABLISHING BOUNDARIES AND UNITS 2-7

Advertisement

Table of Contents
loading

Table of Contents