![background image](http://html.mh-extra.com/html/keithley/6517b/6517b_user-manual_661778081.webp)
5-16
6517B-900-01 Rev. A / Jun 2008
Section 5: Remote Operation
Model 6517B Electrometer User’s Manual
'*RST sets TRIG:SOUR to IMM
CALL SEND(27, "arm:lay2:sour ext", status%)
CALL SEND(27, "trig:coun inf;sour tim;tim .05", status%)
'start everything
CALL SEND(27, "init", status%)
After the Model 6517B receives the
INITiate
command, it stops in
ARM:LAYer2
of the trigger
model, waiting for a pulse on the external trigger jack. After the external trigger signal occurs, the
Model 6517B moves to the
TRIGger
layer. Since
TRIGger:SOURce
is set to
TIMer
, a reading is
triggered immediately, with a subsequent reading every 50ms. Because
TRIGger:COUNt
has
been set to infinity, the trigger model never exits from the
TRIGger
layer.
Generating SRQ on buffer full
When your program must wait until the Model 6517B has completed an operation, it is more
efficient to program the Model 6517B to assert the IEEE-488 SRQ line when it is finished, rather
than repeatedly serial polling the instrument. An IEEE-488 controller will typically address, then
unaddress the instrument to talk each time it performs a serial poll. Repeated polling of the Model
6517B will generally reduce its overall reading throughput. Therefore, use the
srq%()
function
call.
The Model 6517B provides a status bit for nearly every operation it performs. It can be
programmed to assert the IEEE-488 SRQ line whenever a status bit becomes true or false. The
IEEE-488 controller (your computer) can examine the state of the SRQ line without performing a
serial poll, thereby detecting when the 6517B has completed its task without interrupting it in the
process.
The following example program segment sets up the Model 6517B to assert SRQ when the
reading buffer has completely filled, then arms the reading buffer, initiates readings, and waits for
the Model 6517B to indicate that the buffer is full.
This is not a complete program. Not shown are the commands to configure the trigger model and
the reading buffer (see the next example). The example shown here can be modified for any event
in the Model 6517B status reporting system.
'Reset STATus subsystem (not affected by *RST)
CALL SEND(27, "stat:pres;*cls", status%)
CALL SEND(27, "stat:meas:enab 512", status%)
'Enable BFL
CALL SEND(27, "*sre 1", status%)'enable MSB
CALL SEND(27, "trac:feed:cont next", status%)
'Start everything
CALL SEND(27, "init", status%)
WaitSRQ:
IF (NOT(srq%)) THEN GOTO WaitSRQ
CALL SPOLL(27, poll%, status%)
IF (poll% AND 64)=0 THEN GOTO WaitSRQ
Notice that after the program has detected an asserted SRQ line, it serial polls the Model 6517B to
determine if it is the device requesting service. This is necessary for two reasons:
•
Serial polling the Model 6517B causes it to quit asserting the SRQ line
•
In test systems that have more than one IEEE-488 instrument programmed to assert SRQ,
your program must determine which instrument is actually requesting service
Test Equipment Depot - 800.517.8431 - 99 Washington Street Melrose, MA 02176
TestEquipmentDepot.com