From faa0155b9547f7baee8295e980813fca6b874e8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Weber?= Date: Mon, 12 May 2025 16:13:52 +0200 Subject: [PATCH] use target_value and current_value --- .../daq_move_plugins/daq_move_PiezoConcept.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pymodaq_plugins_piezoconcept/daq_move_plugins/daq_move_PiezoConcept.py b/src/pymodaq_plugins_piezoconcept/daq_move_plugins/daq_move_PiezoConcept.py index 5ff8447..e988c6a 100644 --- a/src/pymodaq_plugins_piezoconcept/daq_move_plugins/daq_move_PiezoConcept.py +++ b/src/pymodaq_plugins_piezoconcept/daq_move_plugins/daq_move_PiezoConcept.py @@ -87,8 +87,8 @@ def get_actuator_value(self) -> DataActuator: position = DataActuator(data=pos.pos, units='nm' if pos.unit == 'n' else 'um') position = self.get_position_with_scaling(position) - self.current_position = self.target_position #should be pos but not precise enough conpared to set position - return self.target_position + self.current_value = self.target_value #should be pos but not precise enough conpared to set position + return self.target_value def move_abs(self, position: DataActuator): """ @@ -102,7 +102,7 @@ def move_abs(self, position: DataActuator): """ position = self.check_bound(position) #limits the position within the specified bounds (-100,100) - self.target_position = position + self.target_value = position position = self.set_position_with_scaling(position) #get positions in controller units @@ -113,8 +113,8 @@ def move_abs(self, position: DataActuator): def move_rel(self, position: DataActuator): """ Make the hardware relative move of the Piezo instrument from the given position """ - position = self.check_bound(self.current_position+position)-self.current_position - self.target_position = position+self.current_position + position = self.check_bound(self.current_value+position)-self.current_value + self.target_value = position+self.current_value position = self.set_position_relative_with_scaling(position)