Example #1
0
    def run_Hardware(self):
        """start/stop the Lockin thread"""
        try:
            self.getInfodata = self.running_thread_control(
                SR830_ControlClient(
                    InstrumentAddress=self._InstrumentAddress,
                    mainthread=self,
                    identity=self._identity,
                    Lockin=self._Lockin,
                    prometheus_port=self._prometheus_port,
                    prometheus_name=self._identity,
                ),
                "Hardware",
            )
            # getInfodata = self.running_thread_control(SR530_ControlClient(
            # InstrumentAddress=self._InstrumentAddress, mainthread=self,
            # identity=self._identity), 'Hardware', )

            self.getInfodata.sig_Infodata.connect(self.updateGUI)
            # getInfodata.sig_visaerror.connect(self.printing)
            # getInfodata.sig_assertion.connect(self.printing)
            # getInfodata.sig_visaerror.connect(self.show_error_general)
            # getInfodata.sig_assertion.connect(self.show_error_general)

            # getInfodata.sig_visatimeout.connect(
            # lambda: self.show_error_general('SR830: timeout'))
        except (VisaIOError, NameError) as e:
            # self.show_error_general('running: {}'.format(e))
            self._logger.exception(e)
            raise ApplicationExit("Could not connect to Hardware!")
    def run_Hardware(self):
        """start/stop the LakeShore350 thread"""

        try:
            getInfodata = self.running_thread_control(
                LakeShore350_ControlClient(
                    InstrumentAddress=self._InstrumentAddress,
                    mainthread=self,
                    identity=self._identity,
                    prometheus_port=self._prometheus_port,
                    prometheus_name=self._identity,
                ),
                "Hardware",
            )
            with getInfodata.lock:
                temp = getInfodata.LakeShore350.ControlSetpointQuery(output=1)
                self.tempcontrol_values["setTemperature"] = temp
                rampstatus = getInfodata.LakeShore350.ControlSetpointRampParameterQuery(
                    output=1)
                self.tempcontrol_values["Sweep_status_software"] = bool(
                    rampstatus[0])
                self.tempcontrol_values["SweepRate"] = rampstatus[1]
                self.checkRamp_Status.setChecked(bool(rampstatus[0]))
                self.spinSetRamp_Kpmin.setValue(rampstatus[1])
                self.spinSetTemp_K.setValue(temp)

            getInfodata.sig_Infodata.connect(self.updateGUI)
            # getInfodata.sig_visaerror.connect(self.printing)
            # getInfodata.sig_visaerror.connect(self.show_error_general)
            # getInfodata.sig_assertion.connect(self.printing)
            # getInfodata.sig_assertion.connect(self.show_error_general)
            self.spinSetTemp_K.valueChanged.connect(self.fun_setTemp_valcha)
            self.checkRamp_Status.toggled["bool"].connect(
                self.fun_checkSweep_toggled)
            self.spinSetRamp_Kpmin.valueChanged.connect(
                self.fun_setRamp_valcha)
            self.commandSendConfTemp.clicked.connect(self.fun_sendConfTemp)

            # getInfodata.sig_visatimeout.connect(
            #     lambda: self.show_error_general('LakeShore350: timeout'))

        except (VisaIOError, NameError) as e:
            # self.show_error_general('running: {}'.format(e))
            self._logger.exception(e)
            raise ApplicationExit("Could not connect to Hardware!")
Example #3
0
    def run_Hardware(self):
        """method to start/stop the thread which controls the Oxford ITC"""

        try:
            getInfodata = self.running_thread_control(
                ITC503_ControlClient(
                    InstrumentAddress=self._InstrumentAddress,
                    mainthread=self,
                    identity=self._identity,
                    prometheus_port=self._prometheus_port,
                    prometheus_name=self._identity,
                ),
                "Hardware",
            )

            self.ITC_values["setTemperature"] = getInfodata.ITC.getValue(0)
            with getInfodata.lock:
                sweepstatus = getInfodata.checksweep(stop=False)
            self.ITC_values["Sweep_status_software"] = sweepstatus
            self.checkRamp_Status.setChecked(sweepstatus)

            getInfodata.sig_Infodata.connect(self.updateGUI)
            # getInfodata.sig_visaerror.connect(self.printing)
            # getInfodata.sig_visaerror.connect(self.show_error_general)
            # # getInfodata.sig_assertion.connect(self.printing)
            # getInfodata.sig_assertion.connect(self.show_error_general)
            # getInfodata.sig_visatimeout.connect(
            #     lambda: self.show_error_general('ITC: timeout'))

            # setting ITC values by GUI
            self.spinSetTemp_K.valueChanged.connect(self.fun_setTemp_valcha)
            self.checkRamp_Status.toggled["bool"].connect(
                self.fun_checkSweep_toggled)
            self.spinSetRamp_Kpmin.valueChanged.connect(
                self.fun_setRamp_valcha)
            self.commandSendConfTemp.clicked.connect(self.fun_sendConfTemp)

            # self.sig_useAutocheck.emit(self.window_settings.temp_ITC_useAutoPID)
            # self.sig_newFilePID.emit(self.window_settings.temp_ITC_PIDFile)
        except (VisaIOError, NameError) as e:
            self._logger.exception(e)
            raise ApplicationExit("Could not connect to Hardware!")
    def run_Hardware(self):
        """start/stop the LakeShore350 thread"""

        try:
            self.getInfodata = self.running_thread_control(
                Keithley6221_ControlClient(
                    InstrumentAddress=self._InstrumentAddress,
                    mainthread=self,
                    identity=self._identity,
                    prometheus_port=self._prometheus_port,
                    prometheus_name=self._identity,
                ),
                "Hardware",
            )

            self.getInfodata.sig_Infodata.connect(self.updateGUI)

        except (VisaIOError, NameError) as e:
            # self.show_error_general('running: {}'.format(e))
            self._logger.exception(e)
            raise ApplicationExit("Could not connect to Hardware!")