import visa
rm = visa.ResourceManager('C:/Windows/System32/visa32.dll')
Tek = rm.open_resource('TCPIPO::172.16.1.210::inst0::INSTR')
print(Tek.query('*IDN?'))
pycharm运行显示:
Traceback (most recent call last):
File "H:/python3.7/projects/grid test.py", line 3, in
Tek = rm.open_resource('TCPIPO::172.16.1.210::inst0::INSTR')
File "H:\python3.7\lib\site-packages\pyvisa\highlevel.py", line 1750, in open_resource
info = self.resource_info(resource_name, extended=True)
File "H:\python3.7\lib\site-packages\pyvisa\highlevel.py", line 1704, in resource_info
ret, err = self.visalib.parse_resource_extended(self.session, resource_name)
File "H:\python3.7\lib\site-packages\pyvisa\ctwrapper\functions.py", line 1383, in parse_resource_extended
alias_if_exists)
File "H:\python3.7\lib\site-pack