SECTION3
IEEE-488
Reference
3.3
CONTROLLER PROGRAMMING
The programming instructions covered in
this
section
use examples written with Hewlett Packard
BASIC
ver-
sion
4.0.
This
language was chosen because
of
its versatil-
ity in controlling the
IEEE-488
bus. This section covers
those statements that are essential to Model236
/'237
/238
operation.
NOTE
Controller programming information for us-
ing the
ffiM
PC interfaced through the Capital
Equipment Corporation (CEC),
II
0
Tech,
and
National
IEEE-488
interfaces is located
in
Ap-
pendix
D.
A partial list of
HP
BASIC
4.0 statements is shown
in
Table
3-1.
The statements have a one
or
three digit argu-
ment that
must
be specified. The first digit is the interface
select code, which is set to 7
at
the factory. The last two
digits of those statements requiring a 3-digit argument
specify the primary address.
Those statements with a 3-digit argument show a pri-
mary address
of
16
(the factory default primary address
of the Model236/237 /238). For a different address,
you
would, of course, change the last two digits to the re-
quired value. For example, to send a
GTL
command to a
device using a primary address of 17, the following state-
ment would be used: LOCAL
717.
Some of the statements have two forms; the exact con-
figuration depends
on
the command to be sent over the
bus. For example, CLEAR 7 sends a DCL command,
while CLEAR
716
sends the SOC
command to a device
with a primary address of
16.
3.4
FRONT PANEL ASPECTS
OF
IEEE-488
OPERATION
The following paragraphs discuss aspects of the front
panel that are part of
IEEE-488
operation, including mes-
sages, status indicators,
and
the LOCAL key.
3-2
+
+
Table
3-1.
HP
BASIC
4.0 IEEE-488
Statements
Action
BASIC
Statement
Transmit string to device 16.
OUTPUT 716;A$
Obtain string from device
16.
ENTER 716;A$
Send
GTL
to device
16.
LOCAL716
Send SOC
to device
16.
CLEAR716
Send
OCL to all devices.
CLEAR7
Send remote enable. REMOTE7
Cancel remote enable.
LOCAL7
Serial
poll device16.
SPOLL(716)
Send
local lockout.
LOCAL LOCKOUT
7
Send GET to device
16.
TRIGGER716
SendiFC.
ABORT7
3.4.1
Front
Panel
Messages
The Model
236/'237 /238 has a number of front panel
messages. These messages, which are listed
in
Table 3-2,
inform
you
of certain conditions that occur when sending
device-dependent commands to the instrument
or
when
using the front panel.
Pressing a front panel button
will
remove the existing er-
ror
or
warning message
and
any pending messages.
If
no
buttons are pressed, the message is displayed for 0.8sec.
The following paragraphs describe the front panel mes-
sages associated with
IEEE-488
programming. Note that
the instrument
may
be programmed to generate
an
SRQ
and
U
command status words can
be
checked for specific
error conditions if any of these errors occur. See para-
graphs
3.6.11
and
3.6.19.
IDDC (Illegal Device-dependent Command) Error
An
IDOC
error occurs
when
the unit receives
an
illegal
device-dependent command over the bus. For example,
the command string
IX
includes
an
illegal command be-
cause
'1"
is not
part
of the instrument's programming
language. When
an
illegal command is received, the in-
strument briefly displays the
IDOC
error message.
NOTE
When
an
IDOC
error is detected in a com-
mand
string, all commands in the string,
up
to
and
including the next
X,
are ignored.