APPENDIXD
Controller
Programs
+
IBM
PC/XT/AT
with
Capital Equipment Corporation PC<>4881nterface
(Keithley PC-488-CEC)
Introduction
General information
about
controlling a Model
'2:361237
1238
with
an
mM
PCIXT
I AT
computer
and
Capital Equipment Corporation PC<>488 interface is
given here. Refer
to
the
CEC PC<>488 Programming
and
Reference Manual for complete information.
Initializing
the
System
The first step
in
any
program
is to initialize
the
system
us-
ing
the INITIALIZE routine. This routine sets
the
pri-
mary
ffiEE-488
bus
address
of
the
PC<>488, specifies the
type
of
controller to
be
used,
and
sends
an
interface clear
(IFC) to
the
other devices
on
the
bus.
After booting
up
the
mM
using
DOS
and
entering
BASICA,
the
statements
of
program
1 can
be
used
at
the
start
of
any
program
to initialize
the
system:
Line
30
sets the address
of
the PC<>488 to 21, however,
any
other valid
address
could
be
used
as long as
it
does
not
conflict
with
the
address
of
any
other
device
on
the
bus.
Interface
Basic
Programming
Statements
This
paragraph
covers the PC<>488 statements
that
are
essential to
Model236l237
1238
operation. A partial list
of programming statements is contained
in
Table D-1.
The
mM
BASIC CALL statement is
used
to execute the
PROGRAM
10 DEF SEG=&HC400
20 INITIALIZE=O
30 MY.ADDRESS%=21
40 CONTROLLER%=0
50 CALL INITIALIZE (MY.ADDRESS%,
CONTROLLER%)
Program
1
D-2
+
desired action. Before a CALL routine can
be
used,
BA-
SIC needs to
know
the
offset address
of
the
routine.
In
the
table,
the
first statement of each programming sequence
defines
the
offset
address
of
the
CALL routine.
Example
Program
The following
program
sends
a
command
string from
an
IBM
PCIXT
I AT computer to
the
Model
'2:361237
1238
and
displays
the
response
on
the
CRT. The computer
must
be
equipped
with
a CEC interface card
and
DOS 2.0
(or later revision) operating system.
Directions
1.
Using
the
front panel
menu
feature, set
the
primary
ffiEE-488
address
of
the
Model236l237
1238 to
16.
2.
With
the
power
off, connect
the
Model236 12371238
to
the
ffiEE-488 interface card installed
in
the ffiM
computer.
3. Type
in
BASICA
on
the
computer keyboard to get
into interpretive BASIC language.
4.
Enter
the
lines of Program 2 using
the
return
key af-
ter each line.
5.
Run
the
program
and
type
in
the
desired command
string
at
the
ENTER COMMAND STRING? prompt.
For example, to
view
the
instrument
model
number
and
firmware revision,
type
in
UOX
and
press
there-
turn
key. The Model
'2:361237
1238 firmware revi-
sion, e.g. 236A01, will
then
appear
on
the
computer
display. A single line
of
data
(NSOCV+OO.OOOE+OO,BOOOO)
will
appear
for DOCs
that
have
no
response.
COMMENTS
' Memory offset.
' Offset address
of
routine
' Set PC<>488 address.
' Set for system control.
' Execute INITIALIZE routine.