The POLL Statement and Clearing
SRQ
The POLL statement causes the BASIC interpreter in the
4050 series controllers to serially poll each peripheral device
on the General Purpose Interface Bus (GPIB) and determine
which device is requesting service. When the device is
found, the device sends its status byte to the BASlC
interpreter over the GPIB.
The POLL statement is normally executed in response to
a service request from a peripheral device on the GPIB. Two
numeric variables are specified as parameters in the POLL
statement followed by a series of
110 addresses. The BASlC
interpreter polls the first I10 address in the list, then the
second I10 address, then the third, and so on, until the de-
vice requesting service is found. It is imperative that the 110
address of the device requesting service is in the list, or
program execution is halted.
The PS 5010 asserts SRQ during power up or power
down. The power up
SRQ
must be cleared before
continuing.
POLL A,B;22
This statement shows a method of clearing the service
'
request. The variables A and B in this example may be any
undefined variables. Following the variables is the semicolon
delimiter and the alpha character defined in the first line as
the instruments primary address. The devices position in the
list is assigned to the first variable specified in the POLL
statement. The status word from the device is then sent
over the GPIB and assigned to the second variable specified
in the POLL statement.
Using
Low Level
Settings
P=22
DIM A(26)
PRINT @P:"LLSET?"
WBYTE @64+P:
RBYTE A
WBYTE @32+ P:A
The above program lines retrieve the PS 501 0 settings in
low level binary format and return them at a later time.
Transferring settings in a low level binary format requires
considerably less bus time. The first statement assigns the
PS 501 0 factory set address to the undefined variable P.
The next dimensions A to 26 characters. The low level
settings query command is then sent to the PS 5010. The
fourth statement makes the
PS
5010
a talker and the
fol-
lowing line reads the binary block into the computer mem-
ory. The last statement recovers the low level settings from
the computer memory and sends them back to the
PS 5010. For a definition of the binary block argument see
the description for the LLSET command in this section. Fur-
ther discussion of RBYTE and WBYTE may be found else-
where in this section and in the computer programming
manual.
Program Delays
The PS 5010 delays status reporting, via SRQ after
changes in voltage, current or output, to allow instrument
stabilization. If interrupts to detect changes in status are
desired, a 100 ms delay must be inserted in the program
after each change to insure the PS 5010 has sufficient time
to report.
Information Available
Additional assistance in developing specific application
oriented software is available in the following Tektronix
manuals.
070-3985-00-GPIB Programming Guide. This man-
ual is specifically written for applications of this in-
strument in IEEE-488 systems. It contains
programming instructions, tips and some specific ex-
ample programs.
070-2270-00-4051 GPIB Hardware Support Man-
ual. This manual gives an
indepth discussion of
IEEE-488 bus operation, explanations of bus timing
details and early bus interface circuitry.
070-2058-01 -Programming In BASIC
070-2059-01-Graphic Programming In BASIC
062-5971 -01 -4050-Series programming aids, TI
(includes software)
062-5972-01 -4050-Series programming aids,
T2
(includes software)
070-2380-01 -4907 File Manager Operators manual
070-21 28-00-4924 Users manual
070-1 940-01 -4050 Series Graphic System Opera-
tors manual
070-2056-01 -4050 Series Graphic System Refer-
ence manual
(1 0) 070-391 8-00-4041 Operators manual
(1 1
)
061 -2546-00-4041 Programming Reference
manual
REV
SEP
1981