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-packages\pyvisa\ctwrapper\highlevel.py", line 193, in _return_handler
raise errors.VisaIOError(ret_value)
pyvisa.errors.VisaIOError: VI_ERROR_RSRC_NFOUND (-1073807343): Insufficient location information or the requested device or resource is not present in the system.
Process finished with exit code 1
但如果在VISA Interactive Control来发送指令可以,请问怎么解决?谁知道的话请帮忙给个对策,谢谢!