diff --git a/src/pymodaq_plugins_thorlabs/daq_move_plugins/daq_move_KinesisIntegratedStepper.py b/src/pymodaq_plugins_thorlabs/daq_move_plugins/daq_move_KinesisIntegratedStepper.py index b36a049..a6b2995 100644 --- a/src/pymodaq_plugins_thorlabs/daq_move_plugins/daq_move_KinesisIntegratedStepper.py +++ b/src/pymodaq_plugins_thorlabs/daq_move_plugins/daq_move_KinesisIntegratedStepper.py @@ -39,10 +39,11 @@ def commit_settings(self, param): def ini_stage(self, controller=None): """ """ - self.controller = self.ini_stage_init(controller, IntegratedStepper()) - - if self.settings['multiaxes', 'multi_status'] == "Master": + if self.is_master: + self.controller = IntegratedStepper() self.controller.connect(self.settings['serial_number']) + else: + self.controller = controller info = self.controller.name self.settings.child('controller_id').setValue(info) diff --git a/src/pymodaq_plugins_thorlabs/daq_move_plugins/daq_move_MFF101_pylablib.py b/src/pymodaq_plugins_thorlabs/daq_move_plugins/daq_move_MFF101_pylablib.py index ab1e0d3..acd6063 100644 --- a/src/pymodaq_plugins_thorlabs/daq_move_plugins/daq_move_MFF101_pylablib.py +++ b/src/pymodaq_plugins_thorlabs/daq_move_plugins/daq_move_MFF101_pylablib.py @@ -99,7 +99,7 @@ def ini_stage(self,controller=None): #check whether this stage is controlled by a multiaxe controller (to be defined for each plugin) # if multiaxes then init the controller here if Master state otherwise use external controller - if self.settings.child('multiaxes','ismultiaxes').value() and self.settings.child('multiaxes','multi_status').value()=="Slave": + if not self.is_master: if controller is None: raise Exception('no controller has been defined externally while this axe is a slave one') else: diff --git a/src/pymodaq_plugins_thorlabs/daq_viewer_plugins/plugins_0D/daq_0Dviewer_Kinesis_KPA101.py b/src/pymodaq_plugins_thorlabs/daq_viewer_plugins/plugins_0D/daq_0Dviewer_Kinesis_KPA101.py index f91cad6..a9fb9a4 100644 --- a/src/pymodaq_plugins_thorlabs/daq_viewer_plugins/plugins_0D/daq_0Dviewer_Kinesis_KPA101.py +++ b/src/pymodaq_plugins_thorlabs/daq_viewer_plugins/plugins_0D/daq_0Dviewer_Kinesis_KPA101.py @@ -74,7 +74,7 @@ def ini_detector(self, controller=None): self.status.update(edict(initialized=False, info="", x_axis=None, y_axis=None, controller=None)) try: - if self.settings.child(('controller_status')).value() == "Slave": + if not self.is_master: if controller is None: raise Exception('no controller has been defined externally while this detector is a slave one') else: diff --git a/src/pymodaq_plugins_thorlabs/daq_viewer_plugins/plugins_0D/daq_0Dviewer_TLPMPowermeter.py b/src/pymodaq_plugins_thorlabs/daq_viewer_plugins/plugins_0D/daq_0Dviewer_TLPMPowermeter.py index ce1c3ae..785c816 100644 --- a/src/pymodaq_plugins_thorlabs/daq_viewer_plugins/plugins_0D/daq_0Dviewer_TLPMPowermeter.py +++ b/src/pymodaq_plugins_thorlabs/daq_viewer_plugins/plugins_0D/daq_0Dviewer_TLPMPowermeter.py @@ -62,17 +62,14 @@ def ini_detector(self, controller=None): self.status.update(edict(initialized=False, info="", x_axis=None, y_axis=None, controller=None)) try: - if self.settings.child(('controller_status')).value() == "Slave": - if controller is None: - raise Exception('no controller has been defined externally while this detector is a slave one') - else: - self.controller = controller - else: + if self.is_master: index = DEVICE_NAMES.index(self.settings['devices']) self.controller = CustomTLPM() info = self.controller.infos.get_devices_info(index) self.controller.open_by_index(index) self.settings.child('info').setValue(str(info)) + else: + self.controller = controller self.settings.child('wavelength').setOpts(limits=self.controller.wavelength_range) self.controller.wavelength = self.settings.child('wavelength').value() diff --git a/src/pymodaq_plugins_thorlabs/daq_viewer_plugins/plugins_2D/daq_2Dviewer_Thorlabs_DCx.py b/src/pymodaq_plugins_thorlabs/daq_viewer_plugins/plugins_2D/daq_2Dviewer_Thorlabs_DCx.py index 130e23a..f960614 100644 --- a/src/pymodaq_plugins_thorlabs/daq_viewer_plugins/plugins_2D/daq_2Dviewer_Thorlabs_DCx.py +++ b/src/pymodaq_plugins_thorlabs/daq_viewer_plugins/plugins_2D/daq_2Dviewer_Thorlabs_DCx.py @@ -89,7 +89,7 @@ def ini_detector(self, controller=None): try: self.status.update(edict(initialized=False, info="", x_axis=None, y_axis=None, controller=None)) - if self.settings.child('controller_status').value() == "Slave": + if not self.is_master: if controller is None: raise Exception('no controller has been defined externally while' 'this detector is a slave one')