Programming Example - Keithley 2500 User Manual

Photodiode meter
Hide thumbs Also See for 2500:
Table of Contents

Advertisement

13-20
Remote Operations

Programming example

The following QuickBasic 4.5 programming example will control the Model 2500 via the
RS-232 COM2 port. Place the Model 2500 into the RS-232 mode from the front panel
main menu (press MENU, select COMMUNICATION, select RS-232). When the com-
munication setting is changed, the Model 2500 will reset into that mode.
RD$ = SPACE$ (1500)
CLS
PRINT "Set COM2 baud rate to 9600"
PRINT "Set no flow control, and CR as terminator."
' Configure serial port parameters.
' The following values are the default settings for the Model 2500:
ComOpen$ = "COM2: 9600,N,8,1,ASC,CD0,CS0,DS0,LF,OP0,RS,TB8192,RB8192"
OPEN ComOpen$ FOR RANDOM AS #1
' Model 2500 setup commands:
PRINT #1,"*RST"
PRINT #1,":SENS2:CURR:NPLC 1"
PRINT #1,":SOUR2:VOLT 10"
PRINT #1,":SOUR2:CLE:AUTO ON"
PRINT #1,":TRIG:COUN 1"
PRINT #1,":FORM:ELEM CURR2"
' Initiate a reading and print results:
PRINT #1,":READ?"
LINE INPUT #1, RD$
RD$ = "Current:
PRINT RD$
' Clean up and quit:
finish:
CLOSE #1
CLEAR
END
Test Equipment Depot - 800.517.8431 - 99 Washington Street Melrose, MA 02176
TestEquipmentDepot.com
' Set string space.
' Clear screen.
' Reset instrument to default parameters.
' Set Ch. 2 measurement speed to 1 PLC.
' Set Ch. 2 source to output 10V.
' Enable Ch. 2 source auto output-off.
' Set to perform one measurement.
' Set to output Ch. 2 readings to PC.
' Trigger and acquire one reading.
"
+
RD$
' Close file.
' Interface clear.
Models 2500 and 2502 User's Manual

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

2502

Table of Contents