コード例 #1
0
ファイル: ml_laser_tracker.py プロジェクト: tenifni/Qsim
    def connect(self):
        """
        Creates asynchronous connection
        """
        from labrad.wrappers import connectAsync

        # connect to wavemeter and datavault computers
        self.cxn = yield connectAsync('10.97.112.1',
                                       name=self.name,
                                       password=self.password)
        self.cxn1 = yield connectAsync('10.97.112.4',
                                       name=self.name,
                                       password=self.password)
        # connect to servers
        self.server = yield self.cxn1.bristol_521

        # start looping call after connections are made to the desired servers
        self.lc = LoopingCall(self.loops)
        self.lc.start(self.rate)

        try:
            self.dv = yield self.cxn.servers['Data Vault']
        except KeyError as error:
            error_msg = str(error) + '  ' + 'DataVault is not running'
            raise KeyError(error_msg)

        try:
            self.grapher = self.cxn1.servers['grapher']
        except:
            self.grapher = None

        self.path = yield self.setup_datavault('Time', 'ML Monitor')

        # setup the graphers for each drift monitor plot
        yield self.setup_grapher('ML Monitor')
コード例 #2
0
    def connect(self):

        self.timer = QtCore.QTimer()
        self.timer.timeout.connect(self.main_loop)
        self.timer.start(1000)

        from labrad.wrappers import connectAsync
        self.cxn = yield connectAsync(name='Load Indicator')
        self.cxnwlm = yield connectAsync('10.97.112.2',
                                         password=os.environ['LABRADPASSWORD'],
                                         name='Load Indicator')
        self.W7 = self.cxn.multiplexerserver
        self.wlm = self.cxnwlm.multiplexerserver

        yield self.wlm.signal__frequency_changed(546532)
        yield self.wlm.addListener(listener=self.update_frequency,
                                   source=None,
                                   ID=546532)

        self.dac = self.cxn.dac_ad660_server
        self.arduino_ttl = self.cxn.arduinottl
        #        self.RFscope = self.cxn.ds1052e_scope_server
        self.kt = self.cxn.keithley_2230g_server
        self.kt.select_device(0)
        self.initialize_gui()
コード例 #3
0
ファイル: SCAN_CONTROL.py プロジェクト: EQ4/resonator
 def connect(self):
     from Devices_config import Device_config
     from labrad.wrappers import connectAsync
     from labrad.types import Error
     from labrad import types as T
     self.T = T
     self.cxn = yield connectAsync()
     self.cxncam = yield connectAsync('192.168.169.30')
     self.r = yield self.cxn.registry
     self.dv = yield self.cxn.data_vault
     self.ds = yield self.cxn.pulser
     self.pmt = self.cxn.normalpmtflow
     self.rs = self.cxncam.rohdeschwarz_server
     self.SMAGPIB = Device_config.SC_SMA
     self.rs.select_device(self.SMAGPIB)
     self.control['numStepsAmp'].valueChanged.connect(self.numAStepsChanged)
     self.control['sizeStepsAmp'].valueChanged.connect(self.sizeAStepsChanged)
     self.control['numStepsTfrq'].valueChanged.connect(self.numTStepsChanged)
     self.control['sizeStepsTfrq'].valueChanged.connect(self.sizeTStepsChanged)
     self.button['scan'].clicked.connect(self.scan)
     self.button['stop'].clicked.connect(self.stopScan)
     self.r.cd('', 'Scan Control', self.axis[:2])
     for k in self.control.keys():
         last = yield self.r.get(k + self.axis[:2])
         self.control[k].setValue(last)
コード例 #4
0
    def connect(self):
        """Creates an Asynchronous connection to the wavemeter computer and
        connects incoming signals to relavent functions
        """
        from labrad.wrappers import connectAsync
        self.password = os.environ['LABRADPASSWORD']
        self.wm_cxn = yield connectAsync(multiplexer_config.ip, name = socket.gethostname() + ' Single Channel Lock', password=self.password)
        self.wm = yield self.wm_cxn.multiplexerserver
        self.cxn = yield connectAsync('bender', name = socket.gethostname() + ' Single Channel Lock', password=self.password)
        self.lock_server = yield self.cxn.software_laser_lock_server
        self.bristol = yield self.cxn.bristolserver
        self.piezo = yield self.cxn.piezo_controller
        self.registry = self.cxn.registry

        # Get lasers to lock
        yield self.registry.cd(['Servers','software_laser_lock'])
        lasers_to_lock = yield self.registry.get('lasers')
        for chan in lasers_to_lock:
            self.lasers[chan] = yield self.registry.get(chan)

        yield self.wm.signal__frequency_changed(SIGNALID1)
        yield self.wm.addListener(listener = self.updateFrequency, source = None, ID = SIGNALID1)

        yield self.bristol.signal__frequency_changed(SIGNALID2)
        yield self.bristol.addListener(listener = self.updateBristolFrequency, source = None, ID = SIGNALID2)

        self.initializeGUI()
コード例 #5
0
 def connect(self):
     from labrad.wrappers import connectAsync
     from labrad.types import Error
     try:
         self.cxn = yield connectAsync('192.168.169.49', password='******', tls_mode='off')
     except:
         self.cxn = yield connectAsync('192.168.169.49', password='******')
     yield self.setupListeners()
コード例 #6
0
 def connect(self):
     from labrad.wrappers import connectAsync
     from labrad.types import Error
     try:
         self.cxn = yield connectAsync('192.168.169.49',
                                       password='******',
                                       tls_mode='off')
     except:
         self.cxn = yield connectAsync('192.168.169.49', password='******')
     yield self.setupListeners()
コード例 #7
0
    def connect(self):
        from labrad.wrappers import connectAsync
# For Windows:
        #self.cxn_dmm = yield connectAsync()
        #self.cxn_pulser = yield connectAsync('192.168.169.29')
#For Linux:
        self.cxn_dmm = yield connectAsync('192.168.169.30')
        self.cxn_pulser = yield connectAsync()
        self.pulserServer = yield self.cxn_pulser.pulser
        self.dmmServer = yield self.cxn_dmm.keithley_2110_dmm
        self.dmmServer.select_device()
コード例 #8
0
 def connect(self):
     from labrad.wrappers import connectAsync
     # For Windows:
     #self.cxn_dmm = yield connectAsync()
     #self.cxn_pulser = yield connectAsync('192.168.169.29')
     #For Linux:
     self.cxn_dmm = yield connectAsync('192.168.169.30')
     self.cxn_pulser = yield connectAsync()
     self.pulserServer = yield self.cxn_pulser.pulser
     self.dmmServer = yield self.cxn_dmm.keithley_2110_dmm
     self.dmmServer.select_device()
コード例 #9
0
 def connect(self):
     from labrad.wrappers import connectAsync
     from labrad.types import Error
     try:
         self.cxn = yield connectAsync('192.168.169.49',password='******', tls_mode='off')
     except:
         self.cxn = yield connectAsync('192.168.169.49',password='******')
     self.server = yield self.cxn.laserdac
     self.registry = yield self.cxn.registry
     yield self.loadDict()
     yield self.setupListeners()
     yield self.initializeGUI()
コード例 #10
0
    def connect(self):
        from labrad.wrappers import connectAsync
        from labrad.types import Error

        try:
            self.cxn = yield connectAsync("192.168.169.49", password="******", tls_mode="off")
        except:
            self.cxn = yield connectAsync("192.168.169.49", password="******")

        yield self.setupListeners()
        if self.initialized:
            yield self.followSignal(0, 0)
コード例 #11
0
 def connect(self):
     from labrad.wrappers import connectAsync
     from labrad.types import Error
     try:
         self.cxn = yield connectAsync('192.168.169.49',
                                       password='******',
                                       tls_mode='off')
     except:
         self.cxn = yield connectAsync('192.168.169.49', password='******')
     self.server = yield self.cxn.laserdac
     self.registry = yield self.cxn.registry
     yield self.loadDict()
     yield self.setupListeners()
     yield self.initializeGUI()
コード例 #12
0
 def connectLabrad(self):
     from labrad.wrappers import connectAsync
     self.cxn = yield connectAsync(name=self.name, host=os.getenv('LABRADHOST'), password='')
     yield self.cxn.update.signal__signal(self.updateID)
     yield self.cxn.update.addListener(listener=self.receiveUpdate, source=None, 
                                       ID=self.updateID)
     yield self.cxn.update.register(self.name)
コード例 #13
0
 def connect(self):
     from labrad.wrappers import connectAsync
     from labrad.types import Error
     self.cxn = yield connectAsync()
     self.server = yield self.cxn.data_vault
     yield self.setupListeners()
     print 'Connection established: now listening dataset.'
コード例 #14
0
ファイル: multiplexerclient.py プロジェクト: xycc/common
    def connect(self):
        """Creates an Asynchronous connection to the wavemeter computer and
        connects incoming signals to relavent functions

        """
        from labrad.wrappers import connectAsync
        self.cxn = yield connectAsync('10.97.112.2', name = socket.gethostname() + ' Wave Meter Client')

        self.server = yield self.cxn.multiplexerserver
        self.chaninfo = multiplexer_config.info
        yield self.server.signal__frequency_changed(SIGNALID1)
        yield self.server.signal__selected_channels_changed(SIGNALID2)
        yield self.server.signal__update_exp(SIGNALID3)
        yield self.server.signal__lock_changed(SIGNALID4)
        yield self.server.signal__output_changed(SIGNALID5)
        yield self.server.signal__pidvoltage_changed(SIGNALID6)

        yield self.server.addListener(listener = self.updateFrequency, source = None, ID = SIGNALID1)
        yield self.server.addListener(listener = self.toggleMeas, source = None, ID = SIGNALID2)
        yield self.server.addListener(listener = self.updateexp, source = None, ID = SIGNALID3)
        yield self.server.addListener(listener = self.toggleLock, source = None, ID = SIGNALID4)
        yield self.server.addListener(listener = self.updateWLMOutput, source = None, ID = SIGNALID5)
        yield self.server.addListener(listener = self.updatePIDvoltage, source = None, ID = SIGNALID6)

        self.initializeGUI()
コード例 #15
0
    def connect(self):
        from labrad.wrappers import connectAsync
        self.cxn = yield connectAsync(name='ArduinoControl')
        self.server = yield self.cxn.krbjila_arduino
        devices = yield self.server.get_interface_list()
        for device in devices:
            if device[0:-1] == '/dev/ttyACM':
                yield self.server.select_interface(device)
                self.device = device
        try:
            yield self.server.reset_input_buffer()
        except:
            raise Exception('Arduino device not found.')
        yield self.server.signal__case(self.ID_case)
        yield self.server.addListener(listener=self.displaySignal,
                                      source=None,
                                      ID=self.ID_case)

        yield self.cxn.conductor.signal__experiment_started(self.ID_start)
        yield self.cxn.conductor.addListener(listener=self.started,
                                             source=None,
                                             ID=self.ID_start)

        yield self.server.signal__kill(self.ID_kill)
        yield self.server.addListener(listener=self.onKillSignal,
                                      source=None,
                                      ID=self.ID_kill)
コード例 #16
0
ファイル: TRAPDRIVE_CONTROL_RS.py プロジェクト: EQ4/resonator
    def connect(self):
        from labrad.wrappers import connectAsync
        from labrad.types import Error
        from labrad import types as T
        self.T = T
        self.cxn = yield connectAsync('192.168.169.30')
        self.server = yield self.cxn.marconi_server
        #        self.tds = yield self.cxn.tektronixtds_server
        self.SMAGPIB = 'cct_camera GPIB Bus - GPIB0::1'
        try:
            #yield self.server.select_device('GPIB Bus - USB0::0x0AAD::0x0054::102542')
            yield self.server.select_device(self.SMAGPIB)
        except Error:
            self.setEnabled(False)
            return
        self.update(0)
        currentpower = yield self.server.amplitude()
        currentfreq = yield self.server.frequency()
        self.powerCtrl.setValue(currentpower)
        self.frequencyCtrl.setValue(currentfreq)

        #### Nothing happens on value change!

        ####self.powerCtrl.valueChanged.connect(self.onPowerChange)
        ####self.frequencyCtrl.valueChanged.connect(self.onFreqChange)

        self.stateButton.clicked.connect(self.onOutputChange)
        self.updateButton.clicked.connect(self.update)
        #       self.maximumButton.clicked.connect(self.checkMax)

        #### connect set Button to the method that writes values to server.
        self.setButton.clicked.connect(self.setFreqAndPower)
コード例 #17
0
    def connect(self):
        from labrad.wrappers import connectAsync
        self.cxn = yield connectAsync(multiplexer_config.ip,
                                      name=self.name,
                                      password=self.password)
        self.trap_cxn = yield connectAsync('bender',
                                      name=self.name,
                                      password=self.password)
        self.wm = self.cxn.multiplexerserver
        self.trap = self.trap_cxn.trapserver

        self.bristol = self.trap_cxn.bristolserver
        self.piezo = self.trap_cxn.piezo_controller

        self.reg = self.trap_cxn.registry
        self.set_up_channels()
コード例 #18
0
ファイル: TRAPDRIVE_CONTROL_RS.py プロジェクト: EQ4/resonator
    def connect(self):
        from labrad.wrappers import connectAsync
        from labrad.types import Error
        from labrad import types as T
        self.T = T
        self.cxn = yield connectAsync('192.168.169.30')
        self.server = yield self.cxn.marconi_server
#        self.tds = yield self.cxn.tektronixtds_server
        self.SMAGPIB = 'cct_camera GPIB Bus - GPIB0::1'
        try:
            #yield self.server.select_device('GPIB Bus - USB0::0x0AAD::0x0054::102542')
            yield self.server.select_device(self.SMAGPIB)
        except Error:
            self.setEnabled(False)
            return
        self.update(0)
        currentpower = yield self.server.amplitude()
        currentfreq = yield self.server.frequency()
        self.powerCtrl.setValue(currentpower)
        self.frequencyCtrl.setValue(currentfreq)
            
        #### Nothing happens on value change!          
        
        ####self.powerCtrl.valueChanged.connect(self.onPowerChange)
        ####self.frequencyCtrl.valueChanged.connect(self.onFreqChange)
        
        self.stateButton.clicked.connect(self.onOutputChange)
        self.updateButton.clicked.connect(self.update)
 #       self.maximumButton.clicked.connect(self.checkMax)
 
        #### connect set Button to the method that writes values to server.
        self.setButton.clicked.connect(self.setFreqAndPower)
コード例 #19
0
 def connect(self):
     from labrad.wrappers import connectAsync
     self.password = os.environ['LABRADPASSWORD']
     self.cxn = yield connectAsync('localhost', name=socket.gethostname() \
                                                     + 'Windfreak GUI', password=self.password)
     self.server = self.cxn.windfreak
     self.initializeGUI()
コード例 #20
0
ファイル: connection2.py プロジェクト: syue99/SrE
 def connect(self, name='some client...'):
     from labrad.wrappers import connectAsync
     self.cxn = yield connectAsync(name=name,
                                   host='yesr10.colorado.edu',
                                   password=srqPassword)
     yield self.setupListeners()
     returnValue(self)
コード例 #21
0
    def connect(self):
        from labrad.wrappers import connectAsync

        self.cxn = yield connectAsync(name=socket.gethostname() + " Data Vault Client")
        self.grapher = yield self.cxn.grapher
        self.dv = yield self.cxn.data_vault
        self.initializeGUI()
コード例 #22
0
 def connect(self, host=C.MANAGER_HOST, password=None, tls_mode='off'):
     from labrad.wrappers import connectAsync
     self.cxn = yield connectAsync(host,
                                   password=password,
                                   tls_mode=tls_mode)
     yield self.setupListeners()
     returnValue(self)
コード例 #23
0
 def connect(self):
     from labrad.wrappers import connectAsync
     from labrad.types import Error
     self.cxn = yield connectAsync()
     self.server = yield self.cxn.data_vault
     yield self.setupListeners()
     print 'Connection established: now listening dataset.'
コード例 #24
0
    def connect(self):
        """Creates an Asynchronous connection to dac8718 Server and
        connects incoming signals to relavent functions

        """

        from labrad.wrappers import connectAsync
        self.cxn = yield connectAsync(name='Multipole Server')
        try:
            self.server = self.cxn.dac_ad660_server
        except:
            self.server = None
        self.reg = self.cxn.registry

        yield self.reg.cd(['', 'settings'], True)
        self.multipoles = yield self.reg.get('Multipoles')

        self.electrodes = {}
        for chan_name, channel in self.hc.elec_dict.iteritems():
            electrode = Electrode(channel.dacChannelNumber, channel.octantNumber,
                                  minval = -10.0, maxval = 10.0)
            self.electrodes[electrode.octant] = electrode
            #self.update_dac(0.0, channel)

        self.lc.start(5.0)  # start registry saving looping call
コード例 #25
0
 def initServer( self ):  
     from labrad.wrappers import connectAsync
     cxn = yield connectAsync()
     self.pulser = cxn.pulser
     self.registry = self.client.registry        
     self.createInfo() 
     self.listeners = set()
コード例 #26
0
ファイル: Scalarclient.py プロジェクト: barium-project/barium
 def self_connect(self, host_name, client_name, device_id):
     """Connects to LabRAD, the SR430 Scalar Server, and establishes LabRAD signal connections
     """
     from labrad.wrappers import connectAsync
     self.cxn = yield connectAsync(host=host_name, name=client_name, password="******")
     #try:
     self.server = yield self.cxn.sr430_scalar_server
     print 'Connected to SR430 Scalar Server.'
     self.device_id = device_id
     yield self.server.select_device(device_id)
     
     yield self.server.signal__bins_per_record_changed(self.BPRSIGNALID)
     yield self.server.signal__bin_width_changed(self.BWSIGNALID)
     yield self.server.signal__discriminator_level_changed(self.DLSIGNALID)
     yield self.server.signal__records_per_scan_changed(self.RPSSIGNALID)
     yield self.server.signal__record_signal(self.RECORDSIGNALID)
     yield self.server.signal__panel_signal(self.PANELSIGNALID)
     yield self.server.addListener(listener = self.update_bpr, source = None, ID = self.BPRSIGNALID)
     yield self.server.addListener(listener = self.update_bw, source = None, ID = self.BWSIGNALID)
     yield self.server.addListener(listener = self.update_dl, source = None, ID = self.DLSIGNALID)
     yield self.server.addListener(listener = self.update_rps, source = None, ID = self.RPSSIGNALID)
     yield self.server.addListener(listener = self.record_update, source = None, ID = self.RECORDSIGNALID)
     yield self.server.addListener(listener = self.panel_update, source = None, ID = self.PANELSIGNALID)
     
     self.signal_connect()
コード例 #27
0
    def self_connect(self, host_name, client_name):
        """Connects this object to LabRAD and the RGA Server.
        """
        from labrad.wrappers import connectAsync
        self.cxn = yield connectAsync(host=host_name,
                                      name=client_name,
                                      password="******")
        try:
            self.server = self.cxn.rga_server
            print 'Connected to RGA Server.'
            yield self.server.signal__filament_changed(self.FILSIGNALID)
            yield self.server.signal__mass_lock_changed(self.MLSIGNALID)
            yield self.server.signal__high_voltage_changed(self.HVSIGNALID)
            yield self.server.signal__buffer_read(self.BUFSIGNALID)
            yield self.server.signal__query_sent(self.QUESIGNALID)
            yield self.server.addListener(listener=self.update_fil,
                                          source=None,
                                          ID=self.FILSIGNALID)
            yield self.server.addListener(listener=self.update_ml,
                                          source=None,
                                          ID=self.MLSIGNALID)
            yield self.server.addListener(listener=self.update_hv,
                                          source=None,
                                          ID=self.HVSIGNALID)
            yield self.server.addListener(listener=self.update_buf,
                                          source=None,
                                          ID=self.BUFSIGNALID)
            yield self.server.addListener(listener=self.update_que,
                                          source=None,
                                          ID=self.QUESIGNALID)

            self.signal_connect()
        except:
            print 'RGA Server Unavailable. Client is not connected.'
コード例 #28
0
    def connect(self):
        from labrad.wrappers import connectAsync

        self.cxn = yield connectAsync()
        self.server = yield self.cxn.trigger
        yield self.initializeGUI()
        yield self.setupListeners()
コード例 #29
0
    def self_connect(self, host_name, client_name, device_id):
        """Connects to LabRAD, HP6033A Server, and establishes LabRAD signal connections
        """
        from labrad.wrappers import connectAsync
        self.cxn = yield connectAsync(host=host_name, name=client_name, password="******")
        try:
            self.server = self.cxn.hp6033a_server
            print 'Connected to HP6033A Server'
            self.device_id = device_id
            self.server.select_device(self.device_id)

            yield self.server.signal__current_changed(self.CURRSIGNALID)
            yield self.server.signal__voltage_changed(self.VOLTSIGNALID)
            yield self.server.signal__get_measurements(self.MEASSIGNALID)
            yield self.server.signal__output_changed(self.OUTPSIGNALID)
            yield self.server.signal__pulse_mode_changed(self.PULMSIGNALID)
            yield self.server.addListener(listener = self.update_curr, source = None, ID = self.CURRSIGNALID)
            yield self.server.addListener(listener = self.update_volt, source = None, ID = self.VOLTSIGNALID)
            yield self.server.addListener(listener = self.update_meas, source = None, ID = self.MEASSIGNALID)
            yield self.server.addListener(listener = self.update_outp, source = None, ID = self.OUTPSIGNALID)
            yield self.server.addListener(listener = self.update_pulm, source = None, ID = self.PULMSIGNALID)

            self.signal_connect()
        except:
            print 'HP6033A Server Unavailable. Client is not connected.'
コード例 #30
0
 def connectLabrad(self):
     from labrad.wrappers import connectAsync
     self.cxn = yield connectAsync(name=self.name)
     yield self.cxn.update.signal__signal(self.updateID)
     yield self.cxn.update.addListener(listener=self.receiveUpdate, source=None, 
                                       ID=self.updateID)
     yield self.cxn.update.register(self.name)
コード例 #31
0
 def connect(self):
     from labrad.wrappers import connectAsync
     self.cxn = yield connectAsync(name=socket.gethostname() +
                                   ' Data Vault Client')
     self.grapher = yield self.cxn.grapher
     self.dv = yield self.cxn.data_vault
     self.initializeGUI()
コード例 #32
0
ファイル: DDS9mGui2.py プロジェクト: younapark/yp
    def connect(self):
        """Creates an Asynchronous connection

        """
        from labrad.wrappers import connectAsync
        from labrad.units import WithUnit as U

        self.U = U


        self.cxn = yield connectAsync( dds9m_config.ip , password = '******'
                                   )
    #    self.cxn = yield connectAsync(name = "dac client")
        self.server = yield self.cxn.dds9m2
        self.reg = yield self.cxn.registry

        try:
            yield self.reg.cd('settings')
            self.settings = yield self.reg.dir()
            self.settings = self.settings[1]
        except:
            self.settings = []
        #
        self.dacinfo = dds9m_config.info
        self.initializeGUI()
コード例 #33
0
ファイル: multipole_tracker.py プロジェクト: tenifni/Qsim
    def connect(self):
        """
        Creates asynchronous connection
        """
        from labrad.wrappers import connectAsync

        # connect to multipole server and datavault computers

        self.cxn = yield connectAsync('10.97.112.4',
                                       name=self.name,
                                       password=self.password)
        # connect to servers
        self.server = yield self.cxn.multipole_server()

        # start looping call after connections are made to the desired servers
        self.lc = LoopingCall(self.loops)
        self.lc.start(self.rate)

        try:
            self.dv = yield self.cxn.servers['Data Vault']
        except KeyError as error:
            error_msg = str(error) + '  ' + 'DataVault is not running'
            raise KeyError(error_msg)

        self.path = yield self.setup_datavault('Time', 'Multipole Values [V]')
コード例 #34
0
    def connect(self):
        from labrad.wrappers import connectAsync
        from labrad.types import Error

        self.cxn = yield connectAsync()
        self.dacserver = yield self.cxn.cctdac
        yield self.setupListeners()
コード例 #35
0
    def connect(self):
        """Creates an Asynchronous connection to dac8718 Server and
        connects incoming signals to relavent functions

        """

        from labrad.wrappers import connectAsync
        self.cxn = yield connectAsync(name='Multipole Server')
        try:
            self.server = self.cxn.dac_ad660_server
        except:
            self.server = None
        self.reg = self.cxn.registry

        yield self.reg.cd(['', 'settings'], True)
        self.multipoles = yield self.reg.get('Multipoles')

        self.electrodes = {}
        for chan_name, channel in self.hc.elec_dict.iteritems():
            electrode = Electrode(channel.dacChannelNumber,
                                  channel.octantNumber,
                                  minval=-10.0,
                                  maxval=10.0)
            self.electrodes[electrode.octant] = electrode
            #self.update_dac(0.0, channel)

        self.lc.start(5.0)  # start registry saving looping call
コード例 #36
0
 def connect(self):
     from labrad.wrappers import connectAsync
     from labrad.types import Error
     self.cxn = yield connectAsync()
     self.dacserver = yield self.cxn.dac_server
     yield self.setupListeners()
     yield self.followSignal(0, 0)
コード例 #37
0
ファイル: ad9854_acbox.py プロジェクト: ckometter/afyservers
 def loadConfigInfo(self):
     from labrad.wrappers import connectAsync
     cxn=yield connectAsync()
     reg=cxn.registry
     context = yield cxn.context()
     self.serialLinks = {}
     print('SERVERS:',self.client.servers.keys())
コード例 #38
0
 def initServer(self):
     from labrad.wrappers import connectAsync
     cxn = yield connectAsync()
     self.pulser = cxn.pulser
     self.registry = self.client.registry
     self.createInfo()
     self.listeners = set()
コード例 #39
0
    def connectLabrad(self):
        """
        Make an asynchronous connection to LabRAD
        """
        from labrad.wrappers import connectAsync
        self.cxn = yield connectAsync(name = 'Interactive Signal Client')

        # Connect to emitter server 
        self.server = self.cxn.interactive_emitter_server
        
        
        ### Signals        
        
        # Connect to signal from server (note the method is named from parsed 
        # text of the in the server emitter name)        
        yield self.server.signal__emitted_signal(self.ID)
        yield self.server.signal__efs(self.ID3)
        
        # This registers the client as a listener to the server and assigns a 
        # slot (function) from the client to the signal emitted from the server
        # In this case self.displaySignal
        yield self.server.addListener(listener = self.displaySignal, 
                source = None, ID = self.ID) 
        yield self.server.addListener(listener = self.displayFloat, 
                source = None, ID = self.ID3) 
コード例 #40
0
 def connect(self):
     from labrad.wrappers import connectAsync
     from labrad.types import Error
     self.cxn = yield connectAsync()
     self.dacserver = yield self.cxn.dacserver
     yield self.setupListeners()
     yield self.makeGUI()
コード例 #41
0
 def connect(self):
     from labrad.wrappers import connectAsync
     from labrad.types import Error
     self.cxn = yield connectAsync()
     self.server = yield self.cxn.agilent_server
     try:
         yield self.server.select_device('lattice-pc GPIB Bus - USB0::0x0957::0x0407::MY44051933')
     except Error:
         self.setEnabled(False)
         return
     #set initial values
     initpower = yield self.server.amplitude()
     initfreq = yield self.server.frequency()
     initstate = yield self.server.output()
     #set properties
     self.spinFreq.setDecimals(5)
     self.spinFreq.setSingleStep(10**-4) #set step size to 100HZ
     self.spinPower.setValue(initpower)
     self.spinFreq.setValue(initfreq)
     self.buttonSwitch.setChecked(initstate)
     self.setText(initstate)
     #connect functions
     self.spinPower.valueChanged.connect(self.onPowerChange)
     self.spinFreq.valueChanged.connect(self.onFreqChange) 
     self.buttonSwitch.toggled.connect(self.onOutputChange)   
コード例 #42
0
    def connectLabrad(self):
        """
        Make an asynchronous connection to LabRAD
        """
        from labrad.wrappers import connectAsync
        self.cxn = yield connectAsync(name='Interactive Signal Client')

        # Connect to emitter server
        self.server = self.cxn.interactive_emitter_server

        ### Signals

        # Connect to signal from server (note the method is named from parsed
        # text of the in the server emitter name)
        yield self.server.signal__emitted_signal(self.ID)
        yield self.server.signal__efs(self.ID3)

        # This registers the client as a listener to the server and assigns a
        # slot (function) from the client to the signal emitted from the server
        # In this case self.displaySignal
        yield self.server.addListener(listener=self.displaySignal,
                                      source=None,
                                      ID=self.ID)
        yield self.server.addListener(listener=self.displayFloat,
                                      source=None,
                                      ID=self.ID3)
コード例 #43
0
    def connect(self):

        from labrad.wrappers import connectAsync

        self.cxn = yield connectAsync()
        self.server = self.cxn.protectionbeamserver
        self.initializeGUI()
コード例 #44
0
    def connect(self):
        """Creates an Asynchronous connection to the wavemeter computer and
        connects incoming signals to relavent functions

        """
        self.chaninfo = multiplexer_config.info
        self.wavemeterIP = multiplexer_config.ip
        from labrad.wrappers import connectAsync
        self.cxn = yield connectAsync(self.wavemeterIP,
                                      name=self.name,
                                      password=self.password)

        self.server = yield self.cxn.multiplexerserver
        yield self.server.signal__frequency_changed(SIGNALID1)
        yield self.server.signal__selected_channels_changed(SIGNALID2)
        yield self.server.signal__update_exp(SIGNALID3)
        yield self.server.signal__lock_changed(SIGNALID4)
        yield self.server.signal__output_changed(SIGNALID5)
        yield self.server.signal__pidvoltage_changed(SIGNALID6)
        yield self.server.signal__channel_lock_changed(SIGNALID7)
        yield self.server.signal__amplitude_changed(SIGNALID8)

        yield self.server.addListener(listener = self.updateFrequency, source = None, ID = SIGNALID1)
        yield self.server.addListener(listener = self.toggleMeas, source = None, ID = SIGNALID2)
        yield self.server.addListener(listener = self.updateexp, source = None, ID = SIGNALID3)
        yield self.server.addListener(listener = self.toggleLock, source = None, ID = SIGNALID4)
        yield self.server.addListener(listener = self.updateWLMOutput, source = None, ID = SIGNALID5)
        yield self.server.addListener(listener = self.updatePIDvoltage, source = None, ID = SIGNALID6)
        yield self.server.addListener(listener = self.toggleChannelLock, source = None, ID = SIGNALID7)
        yield self.server.addListener(listener = self.updateAmplitude, source = None, ID = SIGNALID8)

        self.initializeGUI()
コード例 #45
0
    def connect(self):
        """
        Creates asynchronous connection
        """
        from labrad.wrappers import connectAsync

        # connect to wavemeter and datavault computers
        self.cxn = yield connectAsync('10.97.112.2',
                                      name=self.name,
                                      password=self.password)
        self.cxn1 = yield connectAsync('10.97.112.4',
                                       name=self.name,
                                       password=self.password)
        # connect to servers
        self.server = yield self.cxn.multiplexerserver
        self.server1 = yield self.cxn1.multiplexerserver

        #determine if trying to load 171 or 174 based on 935 frequency
        freq935 = yield self.server.get_frequency(self.chan[0])
        if freq935 > 320.570:
            self.set_freq = self.set_freq174
        else:
            self.set_freq = self.set_freq171

        # start looping call after connections are made to the desired servers
        self.lc = LoopingCall(self.loops)
        self.lc.start(self.rate)

        try:
            self.dv = yield self.cxn1.servers['Data Vault']
        except KeyError as error:
            error_msg = str(error) + '  ' + 'DataVault is not running'
            raise KeyError(error_msg)

        try:
            self.grapher = self.cxn1.servers['grapher']
        except:
            self.grapher = None

        self.path = yield self.setup_datavault('Time', 'Laser Monitor')

        # setup the graphers for each drift monitor plot
        yield self.setup_grapher935('935')
        yield self.setup_grapher638('638')
        yield self.setup_grapher369('369')
        yield self.setup_grapher399('399')
コード例 #46
0
 def connect(self):
     from labrad.wrappers import connectAsync
     from labrad.types import Error
     self.cxn = yield connectAsync()
     self.dacserver = yield self.cxn.dac_server
     yield self.setupListeners()
     self.ctrlLayout = QtGui.QVBoxLayout()
     yield self.makeGUI()
コード例 #47
0
 def connect(self):
     from labrad.wrappers import connectAsync
     from labrad.types import Error
     self.cxn = yield connectAsync()
     self.server = yield self.cxn.vcoserver
     yield self.loadDict()
     yield self.setupListeners()
     yield self.initializeGUI()
コード例 #48
0
    def connect(self):
        """
        Creates asynchronous connection
        """
        from labrad.wrappers import connectAsync

        # connect to wavemeter and datavault computers
        self.cxn = yield connectAsync('10.97.112.2',
                                      name=self.name,
                                      password=self.password)
        self.cxn1 = yield connectAsync('10.97.112.4',
                                       name=self.name,
                                       password=self.password)
        # connect to servers
        self.server = yield self.cxn.multiplexerserver
        self.server1 = yield self.cxn1.multiplexerserver

        #determine if trying to load 171 or 174 based on 935 frequency
        freq935 = yield self.server.get_frequency(self.chan[0])
        if freq935 > 320.570:
            self.set_freq = self.set_freq174
        else:
            self.set_freq = self.set_freq171

        # start looping call after connections are made to the desired servers
        self.lc = LoopingCall(self.loops)
        self.lc.start(self.rate)

        try:
            self.dv = yield self.cxn1.servers['Data Vault']
        except KeyError as error:
            error_msg = str(error) + '  ' + 'DataVault is not running'
            raise KeyError(error_msg)

        try:
            self.grapher = self.cxn1.servers['grapher']
        except:
            self.grapher = None

        self.path = yield self.setup_datavault('Time', 'Laser Monitor')

        # setup the graphers for each drift monitor plot
        yield self.setup_grapher935('935')
        yield self.setup_grapher638('638')
        yield self.setup_grapher369('369')
        yield self.setup_grapher399('399')
コード例 #49
0
 def connect(self):
     from labrad.wrappers import connectAsync
     from labrad.types import Error
     self.cxn = yield connectAsync()
     self.dacserver = yield self.cxn.dac_server
     yield self.setupListeners()
     self.ctrlLayout = QtWidgets.QVBoxLayout()
     yield self.makeGUI()
コード例 #50
0
ファイル: RS_CONTROL.py プロジェクト: HaeffnerLab/sqip
 def connect(self):
     from labrad import types as T
     self.T = T
     from labrad.wrappers import connectAsync
     self.cxn = yield connectAsync(self.ip)
     self.server = yield self.cxn.rohdeschwarz_server
     yield self.server.select_device(self.device)
     self.setupWidget()
コード例 #51
0
 def connect(self):
     from labrad import types as T
     self.T = T
     from labrad.wrappers import connectAsync
     self.cxn = yield connectAsync(self.ip)
     self.server = yield self.cxn.rohdeschwarz_server
     yield self.server.select_device(self.device)
     self.setupWidget()
コード例 #52
0
ファイル: connections.py プロジェクト: ckometter/labrad
 def connectLabRAD(self):
     from labrad.wrappers import connectAsync
     from labrad.types import Error
     try:  # if the connection failed and was retried, close the dialog
         self.retryLabradConnectDialog.close()
     except AttributeError:
         pass
     self.cxn = yield connectAsync(name='PyGrapherLive')
     self.attemptDataVaultConnect()
コード例 #53
0
 def connect(self):
     print 'Connecting'
     from labrad.wrappers import connectAsync
     self.cxn = yield connectAsync()
     for server_name in self.servers.keys():
         try:
             self.servers[server_name] = yield self.cxn[server_name]
         except Exception, e:
             print '{} Not Available'.format(e)