
E-8
Example Programs
Controlling the Model 2182 via the RS-232 COM2 port
This example program illustrates the use of the Keithley Model 2182 interfaced to the RS-232
COM2 port. The Model 2182 is set up to take 100 readings at the fastest possible rate (2000 per
second). The readings are taken, sent across the serial port, and displayed on the screen.
' Example program controlling the Model 2182 via the RS-232 COM2 port
' For QuickBASIC 4.5 and CEC PC488 interface card
RD$=SPACE$(1500)
' Set string space
CLS
' CLear screen
PRINT "Set COM2 baud rate to 19200"
PRINT "Set no flow control, and CR as Terminator"
' Configure serial port parameters
ComOpen$="COM2:19200,N,8,1,ASC,CD0,CS0,DS0,LF,OP0,RS,TB8192,RB8192"
OPEN ComOpen$ FOR RANDOM AS #1
' Model 2182 setup commands
' Note Serial communications only operate with SCPI mode....
PRINT #1, "*RST"
' Clear registers
PRINT #1, "*CLS"
' Clear Model 2182
PRINT #1, ":INIT:CONT OFF;:ABORT"
' Init off
PRINT #1, ":SENS:FUNC 'VOLT:DC"
' DCV
PRINT #1, ":SENS:CHAN 1"
' Channel 1
PRINT #1, ":SYST:AZER:STAT OFF"
' Auto zero off
PRINT #1, ":SENS:VOLT:CHAN1:LPAS:STAT OFF"
' Analog filter off
PRINT #1, ":SENS:VOLT:CHAN1:DFIL:STAT OFF"
' Digital filter off
PRINT #1, ":SENS:VOLT:DC:NPLC 0.01"
' NPLC = 0.1
PRINT #1, ":SENS:VOLT:CHAN1:RANG 10"
' 10V range
PRINT #1, ":SENS:VOLT:DC:DIG 4"
' 4 digit
PRINT #1, ":FORM:ELEM READ"
' Reading only
PRINT #1, ":TRIG:COUN 1"
' Trig count 1
PRINT #1, ":SAMP:COUN 100"
' Sample count 100
PRINT #1, ":TRIG:DEL 0"
' No trigger delay
PRINT #1, ":TRIG:SOUR IMM"
' Immediate trigger
PRINT #1, ":DISP:ENAB OFF"
' No display
PRINT #1, ":INIT"
' Send init
SLEEP 1
' Wait one second
PRINT #1, ":FETCH?"
' Read query
LINE INPUT #1, RD$
' Get data
PRINT RD$
' Display data
PRINT #1, ":DISP:ENAB ON"
' Turn on display
PRINT #1, ":SYST:AZER:STAT ON"
' Auto zero on
'Clean up and quit.
finish:
CLOSE #1
' Close file
CLEAR
' Interface clear
END
Содержание 2182
Страница 1: ...www tek com keithley Model 2182 2182A Nanovoltmeter User s Manual 2182A 900 01 Rev B May 2017...
Страница 18: ......
Страница 22: ......
Страница 23: ...1 Getting Started Getting Started...
Страница 41: ...2 VoltageandTemperature Measurements Voltageand Temperature Measurements...
Страница 68: ...2 28 Voltage and Temperature Measurements...
Страница 69: ...3 Range Digits Rate andFilter Range Digits Rate andFilter...
Страница 82: ...3 14 Range Digits Rate and Filter...
Страница 83: ...4 Relative mX b and Percent Relative mX b andPercent...
Страница 91: ...5 RatioandDelta Ratioand Delta...
Страница 117: ...6 Buffer Buffer...
Страница 123: ...7 Triggering Triggering...
Страница 140: ...7 18 Triggering...
Страница 141: ...8 Limits Limits...
Страница 149: ...9 SteppingandScanning Steppingand Scanning...
Страница 168: ...9 20 Stepping and Scanning...
Страница 169: ...10 AnalogOutput Analog Output...
Страница 175: ...11 RemoteOperation Remote Operation...
Страница 205: ...12 CommonCommands Common Commands...
Страница 221: ...13 SCPISignalOriented Measurement Commands SCPISignalOri entedMeasure ment Commands...
Страница 225: ...14 SCPIReferenceTables SCPIRefer enceTables...
Страница 239: ...15 AdditionalSCPI Commands Additional SCPICom mands...
Страница 260: ...15 22 Additional SCPI Commands...
Страница 261: ...A Specifications Specifications...
Страница 263: ...B Statusand ErrorMessages StatusandError Messages...
Страница 268: ...B 6 Status and Error Messages...
Страница 269: ...C Measurement Considerations Measurement Consider ations...
Страница 278: ...C 10 Measurement Considerations...
Страница 279: ...D Model182Emulation Commands Model182 EmulationCom mands...
Страница 284: ...D 6 Model 182 Emulation Commands...
Страница 285: ...E Example Programs ExamplePro grams...
Страница 293: ...F IEEE 488 BusOverview IEEE 488Bus Overview...
Страница 307: ...G IEEE 488andSCPI ConformanceInformation IEEE 488and SCPIConform anceInforma tion...
Страница 310: ...G 4 IEEE 488 and SCPI Conformance Information...
Страница 311: ...H Measurement Queries Measurement Queries...
Страница 316: ...H 6 Measurement Queries...
Страница 317: ...I Delta PulseDelta and DifferentialConductance Delta Pulse Deltaand Dif ferentialCon ductance...