I am trying to communicate with TTi power supply model QPX1200SP through ethernet connection.
Here is my script:
import pyvisa as visa
rm = visa.ResourceManager()
print(rm.list_resources(query='TCP?*')) #specific query for anything over Ethernet
#above line gives me an answer ('TCPIP0::10.10.0.27::9221::SOCKET',), so line below:
ttipsu = 'TCPIP0::10.10.0.27::9221::SOCKET'
psu = rm.open_resource(ttipsu)
I receive a traceback:
File C:PythonLibsite-packagesspyder_kernelspy3compat.py:356 in compat_exec
exec(code, globals, locals)
File c:usersmedocumentspython scriptsvisapyvisa_v1.py:18
psu = rm.open_resource(ttipsu)
File C:PythonLibsite-packagespyvisahighlevel.py:3291 in open_resource
res.open(access_mode, open_timeout)
File C:PythonLibsite-packagespyvisaresourcesresource.py:281 in open
self.session, status = self._resource_manager.open_bare_resource(
File C:PythonLibsite-packagespyvisahighlevel.py:3216 in open_bare_resource
return self.visalib.open(self.session, resource_name, access_mode, open_timeout)
File C:PythonLibsite-packagespyvisactwrapperfunctions.py:1850 in open
ret = library.viOpen(
File C:PythonLibsite-packagespyvisactwrapperhighlevel.py:226 in _return_handler
return self.handle_return_value(session, ret_value) # type: ignore
File C:PythonLibsite-packagespyvisahighlevel.py:251 in handle_return_value
raise errors.VisaIOError(rv)
VisaIOError: VI_ERROR_RSRC_NFOUND (-1073807343): Insufficient location information or the requested device or resource is not present in the system.
I also tried it with line:
rm = visa.ResourceManager('C:\Windows\System32\visa64.dll')
I can ping the 10.10.0.27 with success, 2ms, 0% loss.
What seems to be a problem here?