Programming Example - Keithley 6430 Instruction Manual

Sub-femtoamp remote sourcemeter
Hide thumbs Also See for 6430:
Table of Contents

Advertisement

13-20
Remote Operations

Programming example

The following QuickBasic 4.5 programming example will control the SourceMeter via the
RS-232 COM2 port. Place the SourceMeter into the RS-232 mode from the front panel main
menu (press MENU, select COMMUNICATION, select RS-232). When the communication
setting is changed, the SourceMeter 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 SourceMeter:
ComOpen$ = "COM2: 9600,N,8,1,ASC,CD0,CS0,DS0,LF,OP0,RS,TB8192,RB8192"
OPEN ComOpen$ FOR RANDOM AS #1
' SourceMeter setup commands:
PRINT #1,
PRINT #1,
PRINT #1,
PRINT #1,
PRINT #1,
PRINT #1,
PRINT #1,
PRINT #1,
PRINT #1,
PRINT #1,
' Initiate a reading and print results:
PRINT #1,
LINE INPUT #1, RD$
RD$ = "Resistance:
PRINT RD$
' Clean up and quit:
finish:
CLOSE #1
CLEAR
END
"*RST"
":SENS:FUNC 'RES' "
":SENS:RES:NPLC 1"
":SENS:RES:MODE MAN" ' Select manual ohms mode.
":SOUR:FUNC CURR"
":SOUR:CURR 0.01"
":SOUR:CLE:AUTO ON"
":SENS:VOLT:PROT 10" ' Set 10V compliance limit.
":TRIG:COUN 1"
":FORM:ELEM RES"
":READ?"
"
+
RD$
' Set string space.
' Clear screen.
' Reset instrument to default parameters.
' Select ohms measurement function.
' Set measurement speed to 1 PLC.
' Select current source function.
' Set source to output 10mA.
' Enable source auto output-off.
' Set to perform one measurement.
' Set to output ohms reading to PC.
' Trigger and acquire one reading.
' Close file.
' Interface clear.

Advertisement

Table of Contents
loading

Table of Contents