我使用PyVISA访问我的Keithley 2701 DMM上的频道,我在频道102和103上有TC。当使用“READ?”时我只是从我的一个渠道获取价值而不是两者:贝娄是我的代码:
from pyvisa.vpp43 import visa_library
visa_library.load_library("/Library/Frameworks/Visa.framework/VISA")
import visa
import time
keithley = visa.instrument("ASRL1")
keithley.write('*RST')
print keithley.ask('*IDN?')
keithley.write('TRAC:CLE')
keithley.write("INIT:CONT OFF")
keithley.write("TRIG:sour IMM")
keithley.write("SENSE:FUNC 'TEMP', (@102)")
keithley.write("TEMP:TRAN TC, (@102)")
keithley.write("TEMP:TC:TYPE K, (@102)")
keithley.write("TEMP:RJUN:RSEL INT, (@102)")
keithley.write("SENSE:FUNC 'TEMP', (@103)")
keithley.write("TEMP:TRAN TC, (@103)")
keithley.write("TEMP:TC:TYPE K, (@103)")
keithley.write("TEMP:RJUN:RSEL INT, (@103)")
keithley.write('TRAC:CLE')
keithley.write("INIT:CONT OFF")
keithley.write("TRIG:sour IMM")
keithley.write("TRIG:COUN INF")
keithley.write("ROUT:SCAN (@102,103)")
keithley.write("ROUT:SCAN:TSO IMM")
keithley.write("ROUT:SCAN:LSEL INT")
print keithley.ask("READ?")
我的结果是: + 2.24654121E + 01 C,+ 61.898106SECS,+ 00239RDNG#
对于我的某个频道,这是正确的,但我希望看到两者的结果......我们将不胜感激。
答案 0 :(得分:1)
我不确定READ?
应该如何处理多个频道。我认为有几种可能性:
print keithley.ask("READ?")
print keithley.ask("READ?")
或可能:
keithley.write("READ?")
print keithley.read()
print keithley.read()
答案 1 :(得分:0)
来自1999年SCPI命令参考段落3.3
READ[:<function>]? <parameters>[,<source list>]
我之前没有使用它,但我想你必须指定一个<source list>
所以要阅读1,3,4,5和9频道你会写
print keithley.ask("READ? (@1,3:5,9)")