Commit 18ed2950 authored by Christian Schneider's avatar Christian Schneider
Browse files

Switchend to pyvisa-py

parent 5e51e5f6
......@@ -22,7 +22,7 @@ class APMS(object):
self.version = '1.0.0'
self.ip = ip
# Initialize device
rm = visa.ResourceManager()
rm = visa.ResourceManager('@py')
self._inst = rm.open_resource('TCPIP::{}::INSTR'.format(ip) )
self.__channel=1
self.connection_timeout(1800) #30min timeout, a problem here, if another user (re)connects, it is set again
......
......@@ -29,7 +29,7 @@ class APSIN(object):
self.version = '1.0.0'
self.ip = ip
# Initialize device
rm = visa.ResourceManager()
rm = visa.ResourceManager('@py')
self._inst = rm.open_resource('TCPIP::{}::INSTR'.format(ip))
self.channel = channel
self._ext_def_ref = 10 # MHz
......
......@@ -21,7 +21,7 @@ class BKP_SG(object):
self._channelOpts = ['C1', 'C2']
# Initialize device
try:
self.rm = visa.ResourceManager()
self.rm = visa.ResourceManager('@py')
self.dev = self.rm.open_resource(resID)
# bug in device - device reset command *RST only changes buzzer state
# self.cmd('*RST')
......
......@@ -32,7 +32,7 @@ class B29XX(object):
self.vol_lim = vol_lim
# Initialize device
rm = visa.ResourceManager()
rm = visa.ResourceManager('@py')
self._inst = rm.open_resource('TCPIP::{}::INSTR'.format(ip) )
# Reset
......
......@@ -23,7 +23,7 @@ class E5080(object):
global version
def __init__(self, ip, *pars, **kwargs):
rm = visa.ResourceManager()
rm = visa.ResourceManager('@py')
self._inst = rm.open_resource('TCPIP::{}::INSTR'.format(ip) )
self.version = version
self.ip = ip
......
......@@ -36,7 +36,7 @@ class EXG(object):
self.version = '1.0.3'
self.ip = ip
# Initialize device
rm = visa.ResourceManager()
rm = visa.ResourceManager('@py')
self._inst = rm.open_resource('TCPIP::{}::INSTR'.format(ip) )
self.channel = 1
......
......@@ -32,7 +32,7 @@ class RCDAT(object):
self.__version__ = VERSION
# Initialize connection
rm = visa.ResourceManager()
rm = visa.ResourceManager('@py')
self._inst = rm.open_resource('TCPIP0::{}::SOCKET'.format(ip))
# Correct for bug in minicircuits communication implementation
......
......@@ -27,7 +27,7 @@ class FSV30(object):
ip : str
IP of spectrum analyzer
"""
rm = visa.ResourceManager()
rm = visa.ResourceManager('@py')
self._inst = rm.open_resource('TCPIP::{}::INSTR'.format(ip) )
self.__version__ = '3.0.0'
......
......@@ -39,7 +39,7 @@ class RSC(object):
self.__version__ = VERSION
# Initialize connection
rm = visa.ResourceManager()
rm = visa.ResourceManager('@py')
self._inst = rm.open_resource('TCPIP::{}::INSTR'.format(ip))
def com(self, command, arg="?"):
......
......@@ -26,7 +26,7 @@ class RSA5115B(object):
ip : str
IP of spectrum analyzer
"""
rm = visa.ResourceManager()
rm = visa.ResourceManager('@py')
self._inst = rm.open_resource('TCPIP::{}::INSTR'.format(ip) )
# Set to spectrum
......
......@@ -16,7 +16,7 @@ class V5015(object):
def __init__(self, ip, channel=1):
self.__version__ = VERSION
self.ip = ip
rm = visa.ResourceManager()
rm = visa.ResourceManager('@py')
self._inst = rm.open_resource('TCPIP::{}::SOCKET'.format(ip))
self._inst.read_termination = '\r\n'
......
......@@ -32,7 +32,7 @@ class GS200(object):
self.vol_lim = vol_lim
# Initialize device
rm = visa.ResourceManager()
rm = visa.ResourceManager('@py')
self._inst = rm.open_resource('TCPIP::{}::INSTR'.format(ip) )
self._inst.read_termination = '\n'
self._inst.write_termination = '\n'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment