From 6fd4e9e37516331ce13556840d7ac7322973d1c3 Mon Sep 17 00:00:00 2001 From: Loic GUILMARD Date: Mon, 23 Nov 2026 14:49:55 +0100 Subject: [PATCH] Updated units, epsilons, current_value and main to conform to changes in pymodaq 53 and pass check_plugins --- .../daq_move_CellkraftE1500.py | 18 +++++++++++------- .../plugins_0D/daq_0Dviewer_Pressure.py | 5 ++++- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/pymodaq_plugins_cellkraft/daq_move_plugins/daq_move_CellkraftE1500.py b/src/pymodaq_plugins_cellkraft/daq_move_plugins/daq_move_CellkraftE1500.py index 3c6eefb..70db80c 100644 --- a/src/pymodaq_plugins_cellkraft/daq_move_plugins/daq_move_CellkraftE1500.py +++ b/src/pymodaq_plugins_cellkraft/daq_move_plugins/daq_move_CellkraftE1500.py @@ -1,7 +1,7 @@ from typing import Union, List, Dict from pymodaq_plugins_cellkraft import config from pymodaq.control_modules.move_utility_classes import DAQ_Move_base, comon_parameters_fun, DataActuatorType,\ - DataActuator # common set of parameters for all actuators + DataActuator, main # common set of parameters for all actuators from pymodaq.utils.daq_utils import ThreadCommand # object used to send info back to the main thread from pymodaq.utils.parameter import Parameter from pymodaq_plugins_cellkraft.hardware.cellkraft.Eseries import CellKraftE1500Drivers @@ -41,11 +41,12 @@ class DAQ_Move_CellkraftE1500(DAQ_Move_base): display_units = true """ - is_multiaxes = False + #TODO check if multiaxes work as intended + is_multiaxes = True _axis_names: Union[List[str], Dict[str, str]] = ['Flow', 'Steam_Temperature', 'Tube_Temperature', 'RH', 'Pressure'] - _controller_units: Union[str, List[str]] = ['g/min', '°C', '°C', '%', 'bar'] - _epsilon: Union[float, List[float]] = [0.1, 0.1, 0.1, 1, 1] + _controller_units: Union[str, List[str]] = ['g/min', 'degC', 'degC', '%', 'bar'] + _epsilons: Union[float, List[float]] = [0.1, 0.1, 0.1, 1, 1] data_actuator_type = DataActuatorType.DataActuator @@ -54,7 +55,7 @@ class DAQ_Move_CellkraftE1500(DAQ_Move_base): {'title': 'Host:', 'name': 'host', 'type': 'str', 'value': config('Cellkraft', 'DEVICE01', 'host')}, {'title': 'Write Limit:', 'name': 'limit', 'type': 'str', 'value': 'Nothing'}, {'title': 'Info:', 'name': 'info', 'type': 'str', 'value': 'Nothing', 'readonly': True}, - ] + comon_parameters_fun(is_multiaxes=is_multiaxes, axis_names=_axis_names, epsilon=_epsilon) + ] + comon_parameters_fun(is_multiaxes=is_multiaxes, axis_names=_axis_names, epsilon=_epsilons) # Information sur chaque actuateurs desc = {'Flow': "Lecture en 0.1 près, Ecriture en 0.1 près\n" @@ -193,8 +194,8 @@ def move_rel(self, value: DataActuator): ---------- value: (float) value of the relative target positioning """ - value = self.check_bound(self.current_position + value) - self.current_position - self.target_value = value + self.current_position + value = self.check_bound(self.current_value + value) - self.current_value + self.target_value = value + self.current_value value = self.set_position_relative_with_scaling(value) self.move_value(value) @@ -252,3 +253,6 @@ def stop_motion(self): Pump is the only one that can be stopped, the other are just values that we change """ pass + +if __name__ == '__main__': + main(__file__, True) \ No newline at end of file diff --git a/src/pymodaq_plugins_cellkraft/daq_viewer_plugins/plugins_0D/daq_0Dviewer_Pressure.py b/src/pymodaq_plugins_cellkraft/daq_viewer_plugins/plugins_0D/daq_0Dviewer_Pressure.py index d393f01..02894d4 100644 --- a/src/pymodaq_plugins_cellkraft/daq_viewer_plugins/plugins_0D/daq_0Dviewer_Pressure.py +++ b/src/pymodaq_plugins_cellkraft/daq_viewer_plugins/plugins_0D/daq_0Dviewer_Pressure.py @@ -1,5 +1,5 @@ from pymodaq.utils.data import DataFromPlugins, DataToExport -from pymodaq.control_modules.viewer_utility_classes import DAQ_Viewer_base, comon_parameters +from pymodaq.control_modules.viewer_utility_classes import DAQ_Viewer_base, comon_parameters, main from pymodaq.utils.parameter import Parameter from pymodaq_plugins_cellkraft.hardware.cellkraft.Eseries import CellKraftE1500Drivers @@ -122,3 +122,6 @@ def grab_data(self, Naverage=1, live=False, **kwargs): def stop(self): """Stop the current grab hardware wise if necessary""" return '' + +if __name__ == '__main__': + main(__file__, True) \ No newline at end of file