我正在尝试将 IV 测量(源电流、检测电压)存储到 Keithley2400 缓冲区中,并将测量数据(电压和电流)检索到我的 python 程序变量“数据”中。
rm = pyvisa.ResourceManager()
connected_list=rm.list_resources()
print(connected_list) # list[0] is RS-232 reference
Ki2400 = rm.open_resource(connected_list[0])
Ki2400.read_termination = '\r'
Ki2400.timeout=5000
print(Ki2400.query('*IDN?'))
Ki2400.write('*RST')
Ki2400.write(':sens:func:conc off')
Ki2400.write(':sour:func current')
Ki2400.write(":sens:func 'volt:dc'")
Ki2400.write(':SENS:VOLT:NPLC 0.01')
Ki2400.write(':sens:volt:prot 30')
Ki2400.write(':source:current:start 1e-12')
Ki2400.write(':source:current:stop 100e-3')
#Ki2400.write(':source:current:step 4e-4')
Ki2400.write(':source:sweep:points 500')
Ki2400.write(':source:current:mode sweep')
Ki2400.write(':sour:swe:rang auto')
Ki2400.write(':sour:swe:spac log')
Ki2400.write(':trig:coun 500')
Ki2400.write(':sour:del 0.1')
Ki2400.write('output on')
Ki2400.write('read?')
data=Ki2400.read()
Ki2400.write(':outp off')
但是,这会产生以下错误:
VisaIOError: VI_ERROR_ASRL_OVERRUN (-1073807252): An overrun error occurred during transfer. A character was not read from the hardware before the next character arrived.
我不确定我是否正在对缓冲区中的存储进行编码并正确读取它。任何帮助将不胜感激