In [1]:
import visa
rm = visa.ResourceManager()
In [2]:
rm.list_resources()
Out[2]:
Open Keithley 2000
In [3]:
k20 = rm.open_resource('GPIB0::2::INSTR')
Reset the Keithley 2000
In [4]:
k20.write('*RST')
Out[4]:
Get Keithley 2000 identification
In [5]:
k20.query('*IDN?')
Out[5]:
In [6]:
k20.write(":SENSe:FUNCtion 'Voltage:DC'")
k20.query('READ?')
Out[6]:
In [7]:
k20.query_ascii_values('READ?')
Out[7]:
In [8]:
k20.close()