Example Programs
E-5
Generating SRQ on buffer full
When your program must wait until the Model 2182 has completed an operation, it is more
efficient to program the Model 2182 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 2182 will generally reduce its overall reading throughput. Therefore, use the srq%()
function call.
The Model 2182 provides a status bit for almost 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 Model 2182 has completed its task without interrupting
it in the process.
The following example program segment sets up the Model 2182 to assert SRQ when the
reading buffer has completely filled and then arms the reading buffer, initiates readings, and
waits for the Model 2182 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 2182 status reporting system.
'Reset STATus subsystem (not affected by *RST)
CALL SEND(7, "stat:pres;*cls", status%)
CALL SEND(7, "stat:meas:enab 512", status%)
'enable BFL
CALL SEND(7, "*sre 1"' status%)
'enable MSB
CALL SEND(7, "trac:feed:cont next", status%)
'Start everything
CALL SEND(7, "init", status%)
WaitSRQ:
IF (NOT(srq%()) THEN GOTO WaitSRQ
CALL SPOLL(7, poll%, status%)
IF (poll% AND 64)=0 THEN GOTO WaitSRQ
After the program has detected an asserted SRQ line, it serial polls the Model 2182 to
determine if it is the device requesting service. This is necessary for two reasons:
•
Serial polling the Model 2182 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.
Summary of Contents for 2182
Page 1: ...www tek com keithley Model 2182 2182A Nanovoltmeter User s Manual 2182A 900 01 Rev B May 2017...
Page 18: ......
Page 22: ......
Page 23: ...1 Getting Started Getting Started...
Page 41: ...2 VoltageandTemperature Measurements Voltageand Temperature Measurements...
Page 68: ...2 28 Voltage and Temperature Measurements...
Page 69: ...3 Range Digits Rate andFilter Range Digits Rate andFilter...
Page 82: ...3 14 Range Digits Rate and Filter...
Page 83: ...4 Relative mX b and Percent Relative mX b andPercent...
Page 91: ...5 RatioandDelta Ratioand Delta...
Page 117: ...6 Buffer Buffer...
Page 123: ...7 Triggering Triggering...
Page 140: ...7 18 Triggering...
Page 141: ...8 Limits Limits...
Page 149: ...9 SteppingandScanning Steppingand Scanning...
Page 168: ...9 20 Stepping and Scanning...
Page 169: ...10 AnalogOutput Analog Output...
Page 175: ...11 RemoteOperation Remote Operation...
Page 205: ...12 CommonCommands Common Commands...
Page 221: ...13 SCPISignalOriented Measurement Commands SCPISignalOri entedMeasure ment Commands...
Page 225: ...14 SCPIReferenceTables SCPIRefer enceTables...
Page 239: ...15 AdditionalSCPI Commands Additional SCPICom mands...
Page 260: ...15 22 Additional SCPI Commands...
Page 261: ...A Specifications Specifications...
Page 263: ...B Statusand ErrorMessages StatusandError Messages...
Page 268: ...B 6 Status and Error Messages...
Page 269: ...C Measurement Considerations Measurement Consider ations...
Page 278: ...C 10 Measurement Considerations...
Page 279: ...D Model182Emulation Commands Model182 EmulationCom mands...
Page 284: ...D 6 Model 182 Emulation Commands...
Page 285: ...E Example Programs ExamplePro grams...
Page 293: ...F IEEE 488 BusOverview IEEE 488Bus Overview...
Page 307: ...G IEEE 488andSCPI ConformanceInformation IEEE 488and SCPIConform anceInforma tion...
Page 310: ...G 4 IEEE 488 and SCPI Conformance Information...
Page 311: ...H Measurement Queries Measurement Queries...
Page 316: ...H 6 Measurement Queries...
Page 317: ...I Delta PulseDelta and DifferentialConductance Delta Pulse Deltaand Dif ferentialCon ductance...