HP 7470A Interfacing And Programming Manual page 105

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

Advertisement

)
"EK4051
Example:
)
100 DIM R $ [ 5 ]
110 PRINT
@ 5 : " P f i 1 0 0 0 , 1 0 0 0 ; O C ; "
)
120 INPUT
@5:R,B,C
130 PRINT
® 5 : " 0 I ; "
)
140 INPUT ®5:R$
150 PRINT
R , B , C , R «
)
160 END
)
")
Displayed current pen position and identification.
)
1000
1000
0
7470A
(
\>mmodore PET 2001
Example:
)
10 OPEN 5 , 5
s
20 P R I N T * 5 , " P R 1 0 0 0 , 1 0 0 0 ; O C "
)
30 I N P U T « 5 , R , B , C
\
40 P R I N T a 5 , " 0 I "
'
50 I N P U T * 5 , R $
)
BO PRINT
R , B , C , R $
70 END
' )
* )
Displayed current pen position and identification.
<> )
1000
1000
0
7470A
r
Jommodore PET 8032
Example:
!
)
On the PET 8032, all alphabetic characters are displayed as lowercase.
( )
This is true for both BASIC program statements and for the plotter's
response.
! \
A dummy string variable should be included at the end of every input
'
)
command which reads data from the plotter because the PET 8032
sends an untalk command after it receives a carriage return character.
Since the plotter with an HP-IB interface terminates all output with a
i \
carriage return followed by a line feed, the line feed must be read into
this dummy string variable in order to clear the plotter's output buffer
( )
for future output.
( ) 10 OPEN 5,5
K
i 3
, >
20 PRINT85,"PR1000,1000;OC"
' "***
1
30 INPUT«5,R,B,C,B$
( \
40 PRINT85,"0I"
V
50 INPUT«5,R$,B$
( )
60 PRINT ft, B,C,R$
70 END
r
)
v*-12 HP-IB INTERFACING
.
.
Displayed current pen position and identification.
1000
1000
0
7470a
Apple II Applesoft
BASIC
Example:
10
PR** 3 :
I N * 3
20 Z$» "WTX" + CHR$
( 2 6 )
30 Y $ - "RDE" + CHR$
( 2 6 )
40
PRINT Z $ ;
" P R 1 0 0 0 , 1 0 0 0 ; 0 C ; "
50
PRINT Y $ ;
60
INPUT
R , B , C
70
PRINT Y $ ;
8 0
INPUT D$
90
PRINT Z $ ; " 0 1 "
100
PRINT Y $ ;
1 10
INPUT R*
120
PRINT Y$
130
INPUT D$
140
PR» 0 :
INtt 0
150
PRINT
fl,B,C,fi*
160
END
Displayed current pen position and identification.
1000
1000
0
7470A
For an explanation of PR# 3, Z$ and PR# 0, refer to the Apple II
example in the prior section. The string Y$ instructs the plotter a t
address 5 to talk. The Apple II sends an untalk command after it re­
ceives a carriage return character. The plotter with an HP-IB interface
terminates all output with a carriage return followed by a line feed.
Therefore, in order to clear the plotter's buffer for future output, another
talk instruction and another input statement containing a dummy
variable (D$ in this program) must follow the input statement which
reads parameters of the plotter output statement. The additional talk
and input instructions will read the line feed character, thus clearing
the plotter's buffer.
HP-IB INTERFACING
9-13

Advertisement

Table of Contents
loading

Table of Contents