Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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"
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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)