E-6
Example Programs
Storing readings in buffer
The reading buffer in the Model 2182 is flexible and capable. It has three controls, which are
found in the TRACe subsystem. There are commands to control:
•
The size of the buffer (in readings).
TRACe:POINts <NRf>
•
Where the data is coming from (before or after the CALCulate1 math post-processing).
TRACe:FEED SENSe1
store unprocessed readings
TRACe:FEED CALCulate1
store math processed readings
•
Select buffer control mode.
TRACe:FEED:CONTrol NEVer
immediately stop storing readings
TRACe:FEED:CONTrol NEXT
start now, stop when buffer is full
The following example program sets up the Model 2182 to take 20 readings as fast as it can
into the buffer, and then reads the data back after the buffer has filled.
'Example program to demonstrate the reading buffer
'For QuickBASIC 4.5 and CEC PC488 interface card
'Edit the following line to where the QuickBASIC
'libraries are on your computer
'$INCLUDE: 'c:\qb45\ieeeqb.bi'
'Initialize the CEC interface as address 21
CALL initialize(21, 0)
'Reset controls and put trigger model in IDLE state
CALL SEND(7, "*rst", status%)
'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, "trig:coun 20", status%)
'TRACe subsystem is not affected by *RST
CALL SEND(7, "trac:poin 20", status%)
CALL SEND(7, "trac:feed sens1;feed:cont next", status%)
'Start everything
CALL SEND(7, "init", status%)
'Initialize reading$ while the 2182 is busy taking readings
reading$ = SPACE$(4000)
WaitSRQ:
IF (NOT(srq%)) THEN GOTO WaitSRQ
CALL SPOLL(7, poll%, status%)
IF (poll% AND 64)=0 THEN GOTO WaitSRQ
CALL SEND(7, "stat:meas?", status%)
CALL ENTER(S$, length%, 16, status%)
CALL SEND(7, "form:elem read,unit" status%)
CALL SEND(7, "trac:data?", status%)
CALL ENTER(reading$, length%, 16, status%)
PRINT reading$
NOTE:
To repeat buffer storage, send the following command and then repeat the steps
following the “Start everything” comment in the previous example.
CALL SEND(7, "feed:cont next", status%)
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...