Keithley 2600系列的完整Python驱动程序。
keithley2600的Python项目详细描述
基思列2600
Keithley 2600系列源代码测量单元的完整Python驱动程序。
关于
能够访问基本功能和更高级别功能(如IV)的Keithley驱动程序 测量、传输和输出曲线等基本命令复制功能 以及来自keithley的内部tsp函数的语法,其语法类似于 Python。
警告:
目前,在基本命令中只对允许的参数进行启发式检查。见 Keithley 2600 reference manual 所有可用的命令和参数。几乎所有的keithley tsp命令都可以使用 和这个司机。不支持的是:
- 所有Keithley IV扫描命令。我们在
Keithley2600
类中实现自己的。 - 与keithley tsp属性同名的keithley tsp函数(以及vice
反之亦然)。驱动程序无法决定是将它们作为函数调用处理还是
属性访问。目前,只有一种情况:
io.output()
已被删除,因为它与smuX.source.output
冲突,后者更为 常用的。
- 与驱动程序的内置属性同名的keithley tsp命令。目前,
这只是:
lan.trigger[N].connected
:与Keithley2600
的连接属性冲突。
用法
连接到Keithley 2600并执行一些基本命令:
fromkeithley2600importKeithley2600k=Keithley2600('TCPIP0::192.168.2.121::INSTR')k.smua.source.output=k.smua.OUTPUT_ON# turn on SMUAk.smua.source.levelv=-40# sets SMUA source level to -40Vv=k.smua.measure.v()# measures and returns the SMUA voltagei=k.smua.measure.i()# measures current at smuAk.smua.measure.v(k.smua.nvbuffer1)# measures the voltage, stores the result in bufferk.smua.nvbuffer1.clear()# clears nvbuffer1 of SMUA
驱动程序中定义的高级命令:
data=k.readBuffer(k.smua.nvbuffer1)# reads all entries from nvbuffer1 of SMUAerrs=k.readErrorQueue()# gets all entries from error queuek.setIntegrationTime(k.smua,0.001)# sets integration time in seck.applyVoltage(k.smua,10)# turns on and applies 10V to SMUAk.applyCurrent(k.smub,0.1)# sources 0.1A from SMUBk.rampToVoltage(k.smua,10,delay=0.1,stepSize=1)# ramps SMUA to 10V in steps of 1V# sweep commandsk.voltageSweepSingleSMU(k.smua,range(0,61),t_int=0.1,delay=-1,pulsed=False)k.voltageSweepDualSMU(smu1=k.smua,smu2=k.smub,smu1_sweeplist=range(0,61),smu2_sweeplist=range(0,61),t_int=0.1,delay=-1,pulsed=False)k.transferMeasurement(...)k.outputMeasurement(...)
singleton行为:
一旦创建了带有visa地址的keithley2600实例'address'
,就重复
对^ {< CD7> }的调用将返回现有实例而不是创建
新的。这样可以防止用户打开同一仪器的多个连接
同时允许从
程序。例如:
>>>fromkeithley2600importKeithley2600>>>k1=Keithley2600('TCPIP0::192.168.2.121::INSTR')>>>k2=Keithley2600('TCPIP0::192.168.2.121::INSTR')>>>print(k1isk2)True
数据结构:
方法voltageSweepSingleSMU
和voltageSweepDualSMU
返回带有
测量的电压和电流。高级命令transferMeasurement
和
outputMeasurement
返回ResultTable
与熊猫有些相似的对象
但包括对列单元的支持。ResultTable
存储测量值
作为numpy数组的内部数据,并提供有关列标题和单位的信息。
它还提供了一个类似字典的接口,可以按名称、要加载的方法访问列
并将数据保存到文本文件中,并实时打印数据(需要matplotlib)。
例如:
importtimefromkeithley2600importKeithley2600,ResultTablek=Keithley2600('TCPIP0::192.168.2.121::INSTR')# create ResultTable with two columnsrt=ResultTable(column_titles=['Voltage','Current'],units=['V','A'],params={'recorded':time.asctime(),'sweep_type':'iv'})# create live plot which updates as data is addedrt.plot(live=True)# measure some currentsforvinrange(0,20):k.applyVoltage(k.smua,10)i=k.smua.measure.i()rt.append_row([v,i])# save the datart.save('~/iv_curve.txt')
见documentation 对于所有可用的方法。
安装
通过运行
$ pip install keithley2600
或者github的最新开发版本:
$ pip install git+https://github.com/OE-FET/keithley2600
文档
参见Keithley 2600参考手册 here 所有可用的命令和参数。