Pyvisa 使用是德科技电源发生超时

Pyvisa timing out with a Keysight power generator

我正在尝试回读是德科技发生器在采样期间测量的值,但我一直收到超时错误:

pyvisa.errors.VisaIOError: VI_ERROR_TMO (-1073807339): 
Timeout expired before operation completed.

我能够读取其他数据,例如 IDN,所以我不认为这是终止信号的错误,我一直在使用它来获取我的命令:http://literature.cdn.keysight.com/litweb/pdf/N6705-90001.pdf I 部分我正在看的是从第 162 页到第 168 页。这是我的代码,第一部分获取 IDN 并读取电压和电流正常,这是测量注释之后的部分似乎不起作用。提前谢谢你。

#request info from keysight power generator
print(keysight.query("*IDN?"))
#set voltage, current and turn on otuput
keysight.write("VOLT 10, (@1)")
keysight.write("CURR 1, (@1)")
keysight.write("OUTP ON,(@1)")
#read current volt and curr
print(keysight.query_ascii_values("MEAS:VOLT? (@1)"))
print(keysight.query_ascii_values("MEAS:CURR? (@1)"))
#sets a limit on current and voltage
keysight.write("CURR:LIM .5, (@1)")
keysight.write("VOLT:LIM 30, (@1)")
#measurments
keysight.write("SENS:FUNC:VOLT ON,(@1)")
keysight.write("SENS:SWE:TINT RES1000,(@1)")
keysight.write("SENS:SWE:POIN 500,(@1)")
keysight.write("SENS:SWE:OFFS:POIN 10,(@1)")
keysight.write("INIT:ACQ (@1)")
time.sleep(1)
keysight.write("TRIG:ACQ (@1)")
time.sleep(1)
keysight.write("VOLT 1, (@1)")
time.sleep(1)
keysight.write("VOLT 2, (@1)")
time.sleep(1)
keysight.write("VOLT 3, (@1)")
time.sleep(1)
keysight.write("VOLT 4, (@1)")
time.sleep(1)
keysight.write("VOLT 5, (@1)")
time.sleep(1)
keysight.write("ABOR:ACQ(@1)")
print(keysight.query_ascii_values("FETC:VOLT:MAX?(@1)"))
time.sleep(.5)

原来是间距问题,现在是代码:

#request info from keysight power generator
print(keysight.query("*IDN?"))
#set voltage, current and turn on otuput
keysight.write("*RST")
keysight.write("VOLT 3, (@1)")
keysight.write("CURR 1, (@1)")
keysight.write("OUTP ON,(@1)")
#read current volt and curr
print(keysight.query_ascii_values("MEAS:VOLT? (@1)"))
print(keysight.query_ascii_values("MEAS:CURR? (@1)"))
#sets a limit on current and voltage
keysight.write("CURR:PROT:STAT .5, (@1)")
keysight.write("VOLT:PROT 30, (@1)")
#measurments
keysight.write("SENS:FUNC:VOLT ON,(@1)")
#keysight.write("SENS:FUNC:CURR ON,(@1)")
keysight.write("SENS:SWE:TINT .001,(@1)")
keysight.write("SENS:SWE:POIN 5000,(@1)")
keysight.write("INIT:ACQ (@1)")
keysight.write("TRIG:ACQ (@1)")
keysight.write("VOLT 1, (@1)")
time.sleep(1.2)
keysight.write("VOLT 2, (@1)")
time.sleep(1)
keysight.write("VOLT 3, (@1)")
time.sleep(1)
keysight.write("VOLT 4, (@1)")
time.sleep(1)
keysight.write("VOLT 5, (@1)")
time.sleep(1)
print "\n\n"
time.sleep(5)
x=keysight.query_ascii_values("FETC:ARR:VOLT? (@1)")
print x