Generating Srq On Buffer Full - Keithley 2010 User Manual

Hide thumbs Also See for 2010:
Table of Contents

Advertisement

Generating SRQ on buffer full

When your program must wait until the Model 2010 has completed an operation, it is more
efficient to program the 2010 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 the
instrument to talk and then unaddress it each time it performs a serial poll. Repeated polling of
the Model 2010 will generally reduce its overall reading throughput. Therefore, use the srq%()
function call.
The Model 2010 provides a status bit for almost every operation it performs. It can be pro-
grammed 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 2010 has completed its task without interrupting it in
the process.
The following example program segment sets up the Model 2010 to assert SRQ when the
reading buffer has completely filled and then arms the reading buffer, initiates readings, and
waits for the Model 2010 to indicate that the buffer is full.
This is not a complete program. The commands to configure the trigger model and the reading
buffer (see the next example) are not shown. The example shown here can be modified for any
event in the Model 2010 status reporting system.
'Reset STATus subsystem (not affected by *RST)
CALL SEND(16, "stat:pres;*cls", status%)
CALL SEND(16, "stat:meas:enab 512", status%)
CALL SEND(16, "*sre 1"' status%)
CALL SEND(16, "trac:feed:cont next", status%)
'Start everything
CALL SEND(16, "init", status%)
WaitSRQ:
IF (NOT(srq%()) THEN GOTO WaitSRQ
CALL SPOLL(16, poll%, status%)
IF (poll% AND 64)=0 THEN GOTO WaitSRQ
After the program has detected an asserted SRQ line, it serial polls the Model 2010 to
determine if it is the device requesting service. This is necessary for two reasons:
Serial polling the Model 2010 causes it to stop 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.
Once an event register has caused a service request, it cannot cause another service request
until you clear it by reading it (in this case using STATus:MEASurement[:EVENt]?) or by
sending the *CLS command.
Example Programs
'enable BFL
'enable MSB
C-5

Advertisement

Table of Contents
loading

Table of Contents