Computers With No High Level I/O Statements; Computer With High Level I/O Statements; Sending And Receiving Data; Computer-To-Plotter - HP 7470A Interfacing And Programming Manual

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

Advertisement

)
)
\ d d r e s s i n g
the 7470 as a Talker
pr Listener
)
\
)
In order to communicate effectively with the 7470 plotter, it is important
that you completely understand the addressing protocol of your com­
puter. Therefore, you may wish to review this aspect of your computer
before proceeding.
Computers w i t h N o High Level I/O Statements
On low level computers, addressing devices on the HP-IB bus is accom­
plished using mnemonics, such as CMD, which serve as the "bus
command."
)
)
)
)
)
)
When bus commands are necessary, a typical addressing sequence is
<Unlisten Command>
<Talk Address>
<Listen Addresses>
This sequence is made up of three major parts which serve the following
purposes:
1. The unlisten command is the universal bus command with a char­
acter code of "?". It unaddresses all listeners. After the unlisten com­
mand is transmitted, no active listeners remain on the bus.
2. The talk address designates the device that is to talk. A new talk
address automatically unaddresses the previous talker.
3. The listen addresses designate one or more devices that are to listen.
A listen address adds the designated device as listener along with
other addressed listeners.
This basic addressing sequence simply states who is to talk to whom.
The unlisten command ("?") plays a vital role in this sequence. It is
important that a device receive only the data that is intended for it.
When a new talk address is transmitted in the addressing sequence, the
previous talker is unaddressed. Therefore, only the new talker can send
data on the bus and there is no need to routinely use an untalk
command in the same manner as the unlisten command.
Computers w i t h High Level I / O Statements
In more powerful computers, higher level input/output (I/O) state­
ments are used to specify device addresses on the HP-IB bus. In these
cases, the addressing protocol (unlisten, talk, listen) is a function of the
computer's internal operating system and need not be of concern to the
user.
i
i l
9-6
HP-IB INTERFACING
Sending and Receiving D a t a
Computer-to-Plotter
Transmitting data from a computer to the plotter is typically accom­
plished using I/O statements such as WRITE, PRINT, PRINTS, or
OUTPUT. The following examples of sending program data to the
plotter from various computers are only intended to illustrate the nec­
essity for understanding the I/O statement protocol implemented by
your computer. Each of these examples will cause the plotter to label the
identity of the computer sending data, beginning at the X, Y coordinates
1000,2000. The examples involve sending both character string and
numeric data as variables, and constants or literals.
HP 9825 and 9826 HPL
Example:
0 :
f x d 0 ; d i m
R $ [ 1 3 ]
1 : " SENDING DRTR"-»fi$
2: 2000-»Y
3: 9826-»B
4: wrt 705,"SP1;PR1000,", Y
5: wtb 705,"LBHP",str(B),R*,3
B: end
A terminator is sent by the 9825/9826 at the end of a wrt statement.
Result:
HP 9 8 2 6 SENDING DATA
9826 BASIC
Example:
10
PRINTER I S 705
20
R$«" SENDING DflTR"
30
B - 9 8 2 6
40
Y - 2 0 0 0
50
PRINT " S P 1 ; P R 1 0 0 0 , " , Y
60
PRINT USING " K " ; " L B H P
70
END
I
, B , R $ , " S , "
A terminator is sent by the 9826 at the end of a PRINT statement.
Result:
H P
g
8 2
6 SENDING DATA
HP-IB INTERFACING 9-7
C )

Advertisement

Table of Contents
loading

Table of Contents