Exemplo n.º 1
0
 def __init__(self, properties):
     Device.__init__(self)
     self.inputs = ["x", "y", "r", "phase"]
     self.port = properties['port']
     #self.connection = pyvisa.ResourceManager().open_resource(self.port)
     #self.connection = mock_connection() #Mock connection for tests
     self.connection = GPIBDeviceConnection(self.port)
     self.outputs = []
     self._properties = self._read_properties()
Exemplo n.º 2
0
    def __init__(self, properties):
        Device.__init__(self)
        self.inputs = ["DCV", "DCC"]
        self.outputs = ["DCV", "DCC"]
        self.port = properties['port']
        self.connection = pyvisa.ResourceManager().open_resource(self.port)
        self._set_constants_access()
        #self.connection = mock_connection() #Mock connection for tests

        try:
            self._properties = self._read_properties()
        except Exception as e:
            self.connection.close()
            raise (e)
Exemplo n.º 3
0
 def __init__(self, properties):
     Device.__init__(self)
     self.port = properties['port']
     self.has_adc = properties['has_adc']
     self.frequency = properties['frequency']
     self.points = properties['points']
     self.ramp_time = properties['ramp_time']
     #self.connection = mock_connection(self.port, 115200)
     self.connection = DuckConnection(self.port, 115200)
     self.connection.__enter__()
     self.outputs = [
         " ".join([i, j]) for i, j in product(
             ['Port 0', 'Port 1', 'Port 2', 'Port 3'], ['AC', 'DC'])
     ]
     if self.has_adc:
         self.inputs = ['ADC 0', 'ADC 1', 'ADC 2', 'ADC 3']
     else:
         self.inputs = []
     self._properties = [
         'Frequency (Hz)', 'Points On Graph', 'Ramp Time (V/S)'
     ]
     self.ready = self._update_sine_function()
Exemplo n.º 4
0
 def __init__(self, properties):
     Device.__init__(self) 
     self.connection = None